packages feed

bugsnag-haskell-0.0.1.1: examples/simple/Main.hs

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main (main) where

import Control.Exception (toException)
import Network.Bugsnag

main :: IO ()
main = do
    settings <- newBugsnagSettings "BUGSNAG_API_KEY"

    notifyBugsnag settings $ toException
        $ bugsnagException "Error" "message"
            [ $(currentStackFrame) "myFunction"
            ]