ihp-1.5.0: Haskell Web Framework
Copyright(c) digitally induced GmbH 2020
Safe HaskellNone
LanguageGHC2021

IHP.ErrorController

Description

 
Synopsis

Documentation

displayException :: (Show action, ?context :: ControllerContext, ?request :: Request, ?respond :: Respond) => SomeException -> action -> Text -> IO ResponseReceived Source #

errorHandlerMiddleware :: FrameworkConfig -> Middleware Source #

Middleware that catches exceptions and displays appropriate error pages.

This middleware should be placed near the top of the middleware stack so it can catch exceptions from controllers, routing, and other middleware.

newtype RouterException Source #

Wrapper for exceptions that occur during routing. This allows the error handler middleware to distinguish routing errors from action errors and display appropriate error messages.

newtype InitContextException Source #

Wrapper for exceptions that occur during initContext. This allows the error handler middleware to show "while calling initContext" in the error message, helping developers locate the source of the problem.