{-# LANGUAGE DeriveDataTypeable #-}
module OpenSSL.EVP.Digest.Error where
import Control.Exception
import Data.Typeable ( Typeable )
import Foreign
import Foreign.C
throwIfZero :: String -> IO CInt -> IO ()
throwIfZero :: String -> IO CInt -> IO ()
throwIfZero String
fname =
forall a. (a -> Bool) -> (a -> String) -> IO a -> IO ()
throwIf_ (forall a. Eq a => a -> a -> Bool
==CInt
0) (forall a b. a -> b -> a
const (String -> ShowS
showString String
fname String
" failed with error code 0"))
newtype UnknownAlgorithm = UnknownAlgorithm String
deriving (Int -> UnknownAlgorithm -> ShowS
[UnknownAlgorithm] -> ShowS
UnknownAlgorithm -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnknownAlgorithm] -> ShowS
$cshowList :: [UnknownAlgorithm] -> ShowS
show :: UnknownAlgorithm -> String
$cshow :: UnknownAlgorithm -> String
showsPrec :: Int -> UnknownAlgorithm -> ShowS
$cshowsPrec :: Int -> UnknownAlgorithm -> ShowS
Show, Typeable)
instance Exception UnknownAlgorithm