Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Plugins to handle exceptions
Synopsis
- handleRespError :: forall a b m. (MonadIO m, MonadCatch m, Exception a, IsResp b) => (a -> m b) -> Plugin m
Documentation
handleRespError :: forall a b m. (MonadIO m, MonadCatch m, Exception a, IsResp b) => (a -> m b) -> Plugin m Source #
Catches the run-time exceptions and converts them to responses.
This way of using errors is not recommended. Better use response of the type RespOr
.