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 Source

Error type used

data TorException 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

TorError 

Fields

toreType :: TorErrorType

Our error type

Instances

Eq TorException Source 
Show TorException Source 
Exception TorException Source

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

data TorErrorType Source

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

mkTorError :: TorErrorType -> TorError Source

Generates new TorException

timeoutErrorType :: TorErrorType Source

Tor error when a timeout has occurred

unreachableErrorType :: TorErrorType Source

Tor error when a host was unreachable

protocolErrorType :: String -> TorErrorType Source

Tor error when communication with the SAM bridge fails

permissionDeniedErrorType :: String -> TorErrorType Source

Tor error when communication with the SAM bridge fails

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

Raise an Tor Exception in the IO monad

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

Raise an Tor error in the IO monad