network-anonymous-tor-0.11.0: Haskell API for Tor anonymous networking

Safe HaskellSafe
LanguageHaskell2010

Network.Anonymous.Tor.Error

Description

Tor error types, inspired by System.IO.Error

Synopsis

Documentation

type TorError = TorException #

Error type used

data TorException #

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

TorError 

Fields

Instances

Eq TorException # 
Show TorException # 
Exception TorException #

Derives our Tor exception from the standard exception, which opens it up to being used with all the regular trycatchbracket/etc functions.

data TorErrorType #

An abstract type that contains a value for each variant of TorError

mkTorError :: TorErrorType -> TorError #

Generates new TorException

timeoutErrorType :: TorErrorType #

Tor error when a timeout has occurred

unreachableErrorType :: TorErrorType #

Tor error when a host was unreachable

protocolErrorType :: String -> TorErrorType #

Tor error when communication with the SAM bridge fails

permissionDeniedErrorType :: String -> TorErrorType #

Tor error when communication with the SAM bridge fails

torException :: MonadIO m => TorException -> m a #

Raise an Tor Exception in the IO monad

torError :: MonadIO m => TorError -> m a #

Raise an Tor error in the IO monad