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

Safe HaskellSafe
LanguageHaskell2010

Network.Anonymous.I2P.Error

Description

I2P error types, inspired by System.IO.Error

Synopsis

Documentation

type I2PError = I2PException #

Error type used

data I2PException #

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

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.

mkI2PError :: I2PErrorType -> I2PError #

Generates new I2PException

noVersionErrorType :: I2PErrorType #

I2P error when no protocol version can be agreed upon

duplicatedSessionIdErrorType :: I2PErrorType #

I2P error when a session id already exists

duplicatedDestinationErrorType :: I2PErrorType #

I2P error when a destination already exists

invalidKeyErrorType :: I2PErrorType #

I2P error when an invalid (destination) key is used

invalidIdErrorType :: I2PErrorType #

I2P error when an invalid (session) id is used

timeoutErrorType :: I2PErrorType #

I2P error when a timeout has occurred

unreachableErrorType :: I2PErrorType #

I2P error when a host was unreachable

messageTooLongErrorType :: I2PErrorType #

I2P error when a datagram message would be too long to transmit

protocolErrorType :: I2PErrorType #

I2P error when communication with the SAM bridge fails

i2pException :: MonadIO m => I2PException -> m a #

Raise an I2P Exception in the IO monad

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

Raise an I2P error in the IO monad