airbrake-0.2.0.0: An Airbrake notifier for Haskell

Safe HaskellNone

Airbrake

Contents

Description

Utilities for notifying Airbrake of errors. An Error type is provided; you can convert any instance of Exception to an Error using toError, which uses the exception's Typeable instance.

Airbrake requires a stack trace for any reported exception, but stack trace information isn't readily available for Haskell exceptions. notifyQ and notifyReqQ are provided for the purpose of providing the current file position as the stack trace.

Synopsis

Notifying

notify :: (MonadBaseControl IO m, MonadIO m, MonadThrow m) => AirbrakeConf -> Error -> Locations -> m ()Source

Notify Airbrake of an exception.

notifyReq :: (MonadBaseControl IO m, MonadIO m, MonadThrow m, WebRequest req) => AirbrakeConf -> req -> Error -> Locations -> m ()Source

Notify Airbrake of an exception, providing request metadata along with it.

notifyQ :: Q ExpSource

notify, fetching the current file location using Template Haskell.

 $notifyQ :: (MonadBaseControl IO m, MonadThrow m, MonadIO m)
          => AirbrakeConf -> Error -> m ()

notifyReqQ :: Q ExpSource

notifyReq, fetching the current file location using Template Haskell.

 $notifyReqQ :: (MonadBaseControl IO m, MonadThrow m, MonadIO m, WebRequest req)
             => AirbrakeConf -> req -> Error -> m ()

Notification metadata

Location lists

type Location = (FilePath, Int)Source

A (filename, line) pair.

Wrapping errors

toError :: Exception e => e -> ErrorSource

Convert any Exception to an Error.

data Error Source

Constructors

Error 

Configuration building

data AirbrakeConf Source

Information to use when communicating with Airbrake.

data Server Source

Metadata about the server.

Convenience exports