module Crypto.Noise.Exception where
import Control.Exception.Safe
data ExceptionKeyType
= LocalEphemeral
| LocalStatic
| RemoteEphemeral
| RemoteStatic
deriving Int -> ExceptionKeyType -> ShowS
[ExceptionKeyType] -> ShowS
ExceptionKeyType -> String
(Int -> ExceptionKeyType -> ShowS)
-> (ExceptionKeyType -> String)
-> ([ExceptionKeyType] -> ShowS)
-> Show ExceptionKeyType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExceptionKeyType -> ShowS
showsPrec :: Int -> ExceptionKeyType -> ShowS
$cshow :: ExceptionKeyType -> String
show :: ExceptionKeyType -> String
$cshowList :: [ExceptionKeyType] -> ShowS
showList :: [ExceptionKeyType] -> ShowS
Show
data NoiseException = StaticKeyOverwrite
| InvalidKey ExceptionKeyType
| KeyMissing ExceptionKeyType
| InvalidPattern
| DecryptionError
| MessageLimitReached
deriving Int -> NoiseException -> ShowS
[NoiseException] -> ShowS
NoiseException -> String
(Int -> NoiseException -> ShowS)
-> (NoiseException -> String)
-> ([NoiseException] -> ShowS)
-> Show NoiseException
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NoiseException -> ShowS
showsPrec :: Int -> NoiseException -> ShowS
$cshow :: NoiseException -> String
show :: NoiseException -> String
$cshowList :: [NoiseException] -> ShowS
showList :: [NoiseException] -> ShowS
Show
instance Exception NoiseException