freckle-app-1.15.2.0: Haskell application toolkit used at Freckle
Safe HaskellSafe-Inferred
LanguageHaskell2010

Freckle.App.Exception

Synopsis

Re-export of our current preferred implementation module

Currently MonadUnliftIO-based

Helpers that are agnostic to either implementation

annotatedExceptionMessage :: Exception ex => AnnotatedException ex -> Message Source #

Construct a log Message for any AnnotatedException exception

Produces a log message that works with Datadog Standard Attributes.

https://docs.datadoghq.com/standard-attributes/?search=error.

Exception
   error.message: {displayException on underlying exception}
   error.stack: {prettyCallStack from the annotation, if available}

You are expected to call this with a TypeApplication, for example:

catch myAction $ logError . annotatedExceptionMessage @MyException

annotatedExceptionMessageFrom :: Exception ex => (ex -> Message) -> AnnotatedException ex -> Message Source #

Like annotatedExceptionMessage, but use the supplied function to construct an initial Message that it will augment.