Class ErrorHandler
java.lang.Object
io.vertx.reactivex.ext.web.handler.ErrorHandler
- All Implemented Interfaces:
Handler<RoutingContext>, io.vertx.lang.rx.RxDelegate
public class ErrorHandler
extends Object
implements io.vertx.lang.rx.RxDelegate, 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
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<ErrorHandler> static final StringThe default template to use for rendering -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorHandlerCreate an error handler using defaultsstatic ErrorHandlerCreate an error handlerstatic ErrorHandlerCreate an error handlerstatic ErrorHandlerCreate an error handlerbooleanvoidhandle(RoutingContext event) Something has happened, so handle it.inthashCode()static ErrorHandlernewInstance(ErrorHandler arg) toString()
-
Field Details
-
__TYPE_ARG
-
DEFAULT_ERROR_HANDLER_TEMPLATE
The default template to use for rendering- See Also:
-
-
Constructor Details
-
ErrorHandler
-
ErrorHandler
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
handle
Something has happened, so handle it.- Specified by:
handlein interfaceHandler<RoutingContext>- Parameters:
event- the event to handle
-
create
Create an error handler using defaults- Parameters:
vertx-- Returns:
- the handler
-
create
public static ErrorHandler create(Vertx vertx, String errorTemplateName, boolean displayExceptionDetails) Create an error handler- Parameters:
vertx-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:
vertx-displayExceptionDetails- true if exception details should be displayed- Returns:
- the handler
-
create
Create an error handler- Parameters:
vertx-errorTemplateName- the error template name - will be looked up from the classpath- Returns:
- the handler
-
newInstance
-