Created
September 1, 2012 21:37
-
-
Save sseveran/3588176 to your computer and use it in GitHub Desktop.
Uncaught Exceptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | when no catch frame handles an exception dump core and terminate the process | |
uncaughtExceptionHandler :: SomeException -> IO () | |
{-# NOINLINE uncaughtExceptionHandler #-} | |
uncaughtExceptionHandler !e = do | |
syslog Error $ "Unhandled exception: " ++ show e | |
raiseSignal sigABRT | |
setDefaultUncaughtExceptionHandler :: IO () | |
setDefaultUncaughtExceptionHandler = | |
setUncaughtExceptionHandler uncaughtExceptionHandler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment