public static interface Err.Handler
Err.Default
.Modifier and Type | Method and Description |
---|---|
default Map<String,Object> |
err(Request req,
Response rsp,
Exception ex)
Build a err model from exception.
|
default String |
errPage(Request req,
Response rsp,
Exception ex)
Convert current err to a view location, defaults is:
/err . |
void |
handle(Request req,
Response rsp,
Exception ex)
Handle a route exception by probably logging the error and sending a err response to the
client.
|
default Map<String,Object> err(Request req, Response rsp, Exception ex)
message: String stacktrace: String[] status: int reason: String referer: String
NOTE: Response.status()
it was set by default to status code >
400. This is
the default behavior you can use the generated status code and/or override it.
req
- A HTTP Request.rsp
- A HTTP Response with a default err status code (>
400).ex
- Current exception object.default String errPage(Request req, Response rsp, Exception ex)
/err
.req
- HTTP request.rsp
- HTTP Response.ex
- Error found.Copyright © 2014. All rights reserved.