Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
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.
Methods
public abstract HttpServer.Response resolve(HttpServer.Request request, HandlerMethod handler, Exception failure)
throws Exception |
Method details
resolve
public abstract HttpServer.Response resolve(HttpServer.Request request, HandlerMethod handler, Exception failure)
throws ExceptionParameters
requestHttpServer.Request- the request that failed
handlerHandlerMethod- the route it matched
failureException- 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