network-anonymous-i2p-0.9.0: Haskell API for I2P anonymous networking

Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Anonymous.I2P.Error

Description

I2P error types, inspired by System.IO.Error

Synopsis

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.

Constructors

I2PError 

Fields

i2peType :: I2PErrorType

Our error type

Instances

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 

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 communication with the SAM bridge fails

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

i2pError :: MonadIO m => I2PError -> m a Source

Raise an I2P error in the IO monad