Copyright | (c) 2020 Stack Builders Inc. |
---|---|
License | MIT |
Maintainer | Sebastián Estrella <sestrella@stackbuilders.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
For a fully working example check the following link:
https://github.com/stackbuilders/rollbar-haskell/blob/master/rollbar-yesod/example/Main.hs
Synopsis
- rollbarYesodMiddleware :: (HasSettings m, MonadHandler m, MonadUnliftIO m) => m a -> m a
- rollbarYesodMiddlewareWith :: (HasSettings m, MonadHandler m, MonadUnliftIO m) => (Settings -> Request -> SomeException -> m ()) -> m a -> m a
Documentation
rollbarYesodMiddleware :: (HasSettings m, MonadHandler m, MonadUnliftIO m) => m a -> m a Source #
Captures non HandlerContents
exceptions and send them to Rollbar via the
API. Under the hood, this function uses createItem
function from
rollbar-client.
Example
instance Yesod App where yesodMiddleware = rollbarYesodMiddleware . defaultYesodMiddleware
Since: 0.1.0
rollbarYesodMiddlewareWith :: (HasSettings m, MonadHandler m, MonadUnliftIO m) => (Settings -> Request -> SomeException -> m ()) -> m a -> m a Source #
Similar to rollbarYesodMiddleware
, but it allows customize the function
used to send the SomeException
captured from a handler to Rollbar.
Since: 0.1.0