| Safe Haskell | Safe-Infered |
|---|
System.ExceptionMailer
Contents
Description
Module to catch uncaught exceptions and send a notification email
Documentation
exceptionMailerTag :: StringSource
String tag used for logging to System.Log.Logger
Arguments
| :: Address | Make the email appear to be from this address |
| -> Address | Send the email to here |
| -> IO () |
Setup the global exception notifier. This will catch any otherwise uncaught exceptions and send an email to the given address.
For example,
setupExceptionMailer (mkAddress "My Program" "noreply@example.com")
(mkAddress "Sysadmin" "sysadmin@example.com")
Arguments
| :: String | Make the email appear to be from this address |
| -> String | Send the email to here |
| -> IO () |
Convenience version of setupExceptionMailer that just accepts the email addresses
mkAddress :: String -> String -> AddressSource
Helper function to convert a name and email address into a proper Address
mailError :: Address -> Address -> String -> IO ()Source
Send an error email. Exported so that it may be re-used from your own exception handling routines
Re-exported for convenience
data Address