Interface ErrorHandler
- All Superinterfaces:
Handler<RoutingContext>
A pretty error handler for rendering error pages. When working in development mode
exception details will be returned in the server responses, otherwise or when
manually specified no exception details are returned in the HTTP response.
The reason the display of the exception details is by default dependent of the mode
is to follow the security best practices:
https://www.owasp.org/index.php/Improper_Error_Handling
- Author:
- Tim Fox, Paulo Lopes
-
Field Summary
Fields -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic ErrorHandlerCreate an error handler using defaultsstatic ErrorHandlerCreate an error handlerstatic ErrorHandlerCreate an error handlerstatic ErrorHandlerCreate an error handler
-
Field Details
-
DEFAULT_ERROR_HANDLER_TEMPLATE
The default template to use for rendering- See Also:
-
-
Method Details
-
create
-
create
Create an error handler- Parameters:
errorTemplateName- the error template name - will be looked up from the classpathdisplayExceptionDetails- true if exception details should be displayed- Returns:
- the handler
-
create
Create an error handler- Parameters:
displayExceptionDetails- true if exception details should be displayed- Returns:
- the handler
-
create
Create an error handler- Parameters:
errorTemplateName- the error template name - will be looked up from the classpath- Returns:
- the handler
-