Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
I2P error types, inspired by System.IO.Error
- type I2PError = I2PException
- data I2PException = I2PError {}
- data I2PErrorType
- mkI2PError :: I2PErrorType -> I2PError
- noVersionErrorType :: I2PErrorType
- duplicatedSessionIdErrorType :: I2PErrorType
- duplicatedDestinationErrorType :: I2PErrorType
- invalidKeyErrorType :: I2PErrorType
- invalidIdErrorType :: I2PErrorType
- timeoutErrorType :: I2PErrorType
- unreachableErrorType :: I2PErrorType
- messageTooLongErrorType :: I2PErrorType
- protocolErrorType :: I2PErrorType
- i2pException :: MonadIO m => I2PException -> m a
- i2pError :: MonadIO m => I2PError -> m a
Documentation
type I2PError = I2PException Source
Error type used
data I2PException Source
Exception that we use to throw. It is the only type of exception we throw, and the type of error is embedded within the exception.
I2PError | |
|
Eq I2PException | |
Show I2PException | |
Exception I2PException | Derives our I2P exception from the standard exception, which opens it up to being used with all the regular trycatchbracket/etc functions. |
Typeable * I2PException |
data I2PErrorType Source
An abstract type that contains a value for each variant of I2PError
mkI2PError :: I2PErrorType -> I2PError Source
Generates new I2PException
noVersionErrorType :: I2PErrorType Source
I2P error when no protocol version can be agreed upon
duplicatedSessionIdErrorType :: I2PErrorType Source
I2P error when a session id already exists
duplicatedDestinationErrorType :: I2PErrorType Source
I2P error when a destination already exists
invalidKeyErrorType :: I2PErrorType Source
I2P error when an invalid (destination) key is used
invalidIdErrorType :: I2PErrorType Source
I2P error when an invalid (session) id is used
timeoutErrorType :: I2PErrorType Source
I2P error when a timeout has occurred
unreachableErrorType :: I2PErrorType Source
I2P error when a host was unreachable
messageTooLongErrorType :: I2PErrorType Source
I2P error when a datagram message would be too long to transmit
protocolErrorType :: I2PErrorType Source
I2P error when communication with the SAM bridge fails
i2pException :: MonadIO m => I2PException -> m a Source
Raise an I2P Exception in the IO monad