| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Network.Anonymous.Tor.Error
Description
Tor error types, inspired by System.IO.Error
- type TorError = TorException
- data TorException = TorError {}
- data TorErrorType
- mkTorError :: TorErrorType -> TorError
- timeoutErrorType :: TorErrorType
- unreachableErrorType :: TorErrorType
- protocolErrorType :: String -> TorErrorType
- permissionDeniedErrorType :: String -> TorErrorType
- torException :: MonadIO m => TorException -> m a
- torError :: MonadIO m => TorError -> m a
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
Constructors
| Timeout | |
| Unreachable | |
| ProtocolError String | |
| PermissionDenied String |
Instances
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