Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
ControllerException :: String -> ControllerExceptionsimple Web.Simple.Controller.Trans No documentation available.
UncaughtException :: SomeException -> ExitReasonthread-supervisor Control.Concurrent.Supervisor A synchronous exception was thrown and it was not caught. This indicates some unhandled error happened inside of the thread handler.
UncaughtException :: SomeException -> ExitReasonthread-supervisor Control.Concurrent.SupervisorInternal A synchronous exception was thrown and it was not caught. This indicates some unhandled error happened inside of the thread handler.
newtype
DisplayExceptionInShow uncaught-exception Control.Exception.Uncaught Helper data type used by displayUncaughtException. It causes show to call displayException. When an exception of this type is caught, it will be shown and that will call displayException of the wrapped exception.
DisplayExceptionInShow :: SomeException -> DisplayExceptionInShowuncaught-exception Control.Exception.Uncaught No documentation available.
displayUncaughtException :: IO a -> IO auncaught-exception Control.Exception.Uncaught Customise default uncaught exception handling to use displayException instead of show. This function is supposed to be applied to the body of main. Note that it only affects exceptions in the current thread, other threads are not affected. It is adviced to use the async package that propagates exceptions from the child thread to the parent thread. It works by catching all exceptions and wrapping them into a wrapper data type whose show method uses displayException. The wrapped exception is re-thrown and the default exception handler will handle it. displayException will be used for printing because that's how show of the wrapper data type is implemented. Some exceptions are not wrapped:
- ExitCode exception because it's treated specially and affects exit code of the application. If we catch ExitSuccess, wrap it into another data type and re-throw, the program will end with non-zero code which is not desirable.
- Asynchronous exceptions. There are not many of them and applying displayException to them usually does not give big benefit. However, some of them may be handled somewhat specially by the runtime system and we don't want to mess up with that. We recognize asynchronous exceptions by casting to SomeAsyncException the same way as the safe-exceptions library.
setDisplayExceptionHandler :: IO ()uncaught-exception Control.Exception.Uncaught A version of withDisplayExceptionHandler that updates the handler forever. The only difference is that it doesn't restore the default handler. This function should give more predictable behavior in case there are multiple threads.
withDisplayExceptionHandler :: IO a -> IO auncaught-exception Control.Exception.Uncaught Customise default uncaught exception handling to use displayException instead of show. This function is supposed to be applied to the body of main. It works similarly to displayUncaughtException, but instead of catching and throwing exceptions it modifies the uncaught exception handler to wrap the exception before processing it. As a consequence, it affects all threads. When the action finishes, the uncaught exception handler is restored (normally it should not matter because the function is supposed to be applied to the whole main). Note that it may cause race condition if the passed action spawns another thread that throws an uncaught exception when the passed action stops. There is a global variable that stores the uncaught exception handler. Hence it's recommended to use functions from the async package to spawn threads, so that they are stopped before their parent. The handler won't be restored in case of exception thrown by the passed action because otherwise it wouldn't work. Specifically, if we restored the handler in case of exception (e. g. using bracket), it would be restored before the uncaught exception handler would be called (because the uncaught exception handler is called after everything).
wrapException :: SomeException -> SomeExceptionuncaught-exception Control.Exception.Uncaught No documentation available.
componentErrorOriginalException :: ComponentError -> !SomeExceptioncomponentm-devel Control.Monad.Component.Development Exception that was originally thrown by the Application Callback