| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Capnp.Rpc.Errors
Contents
Description
Synopsis
- wrapException :: Bool -> SomeException -> Exception
- eMethodUnimplemented :: Exception
- eUnimplemented :: Text -> Exception
- eDisconnected :: Exception
- eFailed :: Text -> Exception
- throwFailed :: MonadThrow m => Text -> m a
Converting arbitrary exceptions to capnproto exceptions
wrapException :: Bool -> SomeException -> Exception Source #
converts an arbitrary haskell exception
wrapException debugMode ee into an rpc exception, which can be communicated to a remote vat.
If debugMode is true, the returned exception's reason field will include
the text of show e.
Helpers for constructing exceptions
eMethodUnimplemented :: Exception Source #
An exception indicating an unimplemented method.
eUnimplemented :: Text -> Exception Source #
An unimplemented exception with a custom reason message.
eDisconnected :: Exception Source #
An exception with type = disconnected
eFailed :: Text -> Exception Source #
Construct an exception with a type field of failed and the given text as its reason.
throwFailed :: MonadThrow m => Text -> m a Source #
Throw an exception with a type field of Exception'Type'failed and
the argument as a reason.
Orphan instances
| Exception Exception Source # | |
Methods toException :: Exception -> SomeException # fromException :: SomeException -> Maybe Exception # displayException :: Exception -> String # | |