Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Uncaught Exceptions
-- | 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
You can’t perform that action at this time.