Interface ExceptionHandlerFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ExceptionHandlerFunction
An interface for exception handler.
- See Also:
ExceptionHandler
-
Method Summary
Modifier and Type Method Description static <T> T
fallthrough()
Throws aFallthroughException
in order to try to handle theThrowable
by the next handler.HttpResponse
handleException(ServiceRequestContext ctx, HttpRequest req, Throwable cause)
Returns anHttpResponse
which would be sent back to the client who sent thereq
.
-
Method Details
-
handleException
@CheckReturnValue HttpResponse handleException(ServiceRequestContext ctx, HttpRequest req, Throwable cause)Returns anHttpResponse
which would be sent back to the client who sent thereq
. Callsfallthrough()
or throws aFallthroughException
if this handler cannot handle thecause
. -
fallthrough
static <T> T fallthrough()Throws aFallthroughException
in order to try to handle theThrowable
by the next handler.
-