Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- wrapException :: Bool -> SomeException -> Parsed Exception
- eMethodUnimplemented :: Parsed Exception
- eUnimplemented :: Text -> Parsed Exception
- eDisconnected :: Parsed Exception
- eFailed :: Text -> Parsed Exception
- throwFailed :: MonadThrow m => Text -> m a
Converting arbitrary exceptions to capnproto exceptions
wrapException :: Bool -> SomeException -> Parsed 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 :: Parsed Exception Source #
An exception indicating an unimplemented method.
eUnimplemented :: Text -> Parsed Exception Source #
An unimplemented
exception with a custom reason message.
eDisconnected :: Parsed Exception Source #
An exception with type = disconnected
eFailed :: Text -> Parsed 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 (Parsed Exception) Source # | |
toException :: Parsed Exception -> SomeException # fromException :: SomeException -> Maybe (Parsed Exception) # displayException :: Parsed Exception -> String # |