Interface ExceptionResolver
public interface ExceptionResolver
Turns an exception a controller threw into a response.
The build writes one for each controller with @ExceptionHandler methods and
for each @ControllerAdvice bean; an application rarely implements it
directly, but may, and register it as a bean like an advice.
-
Method Summary
Modifier and TypeMethodDescriptionresolve(HttpServer.Request request, HandlerMethod handler, Exception failure)
-
Method Details
-
resolve
HttpServer.Response resolve(HttpServer.Request request, HandlerMethod handler, Exception failure) throws Exception - Parameters:
request- the request that failedhandler- the route it matchedfailure- what was thrown- Returns:
- the response, or null when this resolver does not handle it
- Throws:
Exception- when handling it failed; answered as a server error
-