Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.Bugsnag.Exception
Synopsis
Documentation
data BugsnagException Source #
Constructors
BugsnagException | |
Fields |
Instances
bugsnagException :: Text -> Text -> [BugsnagStackFrame] -> BugsnagException Source #
Construct a throwable BugsnagException
Note that Message is optional in the API, but we consider it required because
that's just silly. To include a stack frame from the location of construction
via Template Haskell, see
.currentStackFrame
bugsnagExceptionFromSomeException :: SomeException -> BugsnagException Source #
Construct a
from a BugsnagException
SomeException
s are left as-is, and BugsnagException
exceptions are parsed
for ErrorCall
information to use as HasCallStack
stacktrace
. Otherwise, we
attempt to determine errorClass
and we use the
n exception as
show
message
.
>>>
import Control.Arrow
>>>
import System.IO.Error
>>>
(beErrorClass &&& beMessage) $ bugsnagExceptionFromSomeException $ toException $ userError "Oops"
("IOException",Just "user error (Oops)")