Package io.vertx.mutiny.ext.web.handler
Class ErrorHandler
- java.lang.Object
-
- io.vertx.mutiny.ext.web.handler.ErrorHandler
-
- All Implemented Interfaces:
io.vertx.core.Handler<RoutingContext>
,Consumer<RoutingContext>
public class ErrorHandler extends Object implements io.vertx.core.Handler<RoutingContext>, Consumer<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 theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<ErrorHandler>
__TYPE_ARG
static String
DEFAULT_ERROR_HANDLER_TEMPLATE
The default template to use for rendering
-
Constructor Summary
Constructors Constructor Description ErrorHandler(io.vertx.ext.web.handler.ErrorHandler delegate)
ErrorHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(RoutingContext item)
static ErrorHandler
create(Vertx vertx)
static ErrorHandler
create(Vertx vertx, boolean displayExceptionDetails)
static ErrorHandler
create(Vertx vertx, String errorTemplateName)
static ErrorHandler
create(Vertx vertx, String errorTemplateName, boolean displayExceptionDetails)
boolean
equals(Object o)
io.vertx.ext.web.handler.ErrorHandler
getDelegate()
void
handle(RoutingContext arg0)
int
hashCode()
static ErrorHandler
newInstance(io.vertx.ext.web.handler.ErrorHandler arg)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<ErrorHandler> __TYPE_ARG
-
DEFAULT_ERROR_HANDLER_TEMPLATE
public static final String DEFAULT_ERROR_HANDLER_TEMPLATE
The default template to use for rendering- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ErrorHandler
public ErrorHandler(io.vertx.ext.web.handler.ErrorHandler delegate)
-
ErrorHandler
public ErrorHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.handler.ErrorHandler getDelegate()
-
handle
public void handle(RoutingContext arg0)
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
-
create
public static ErrorHandler create(Vertx vertx)
- Parameters:
vertx
-- Returns:
- the handler
-
create
public static ErrorHandler create(Vertx vertx, String errorTemplateName, boolean displayExceptionDetails)
- 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
public static ErrorHandler create(Vertx vertx, boolean displayExceptionDetails)
- Parameters:
vertx
-displayExceptionDetails
- true if exception details should be displayed- Returns:
- the handler
-
create
public static ErrorHandler create(Vertx vertx, String errorTemplateName)
- Parameters:
vertx
-errorTemplateName
- the error template name - will be looked up from the classpath- Returns:
- the handler
-
accept
public void accept(RoutingContext item)
- Specified by:
accept
in interfaceConsumer<RoutingContext>
-
newInstance
public static ErrorHandler newInstance(io.vertx.ext.web.handler.ErrorHandler arg)
-
-