Interface ResponseMarshaler.Builder.ThrowableHandler
- Enclosing class:
ResponseMarshaler.Builder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Function used to support pluggable implementations of
ResponseMarshaler.forThrowable(Request, Throwable, ResourceMethod).- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionhandle(Request request, Throwable throwable, ResourceMethod resourceMethod) Prepares a response for scenarios in which an uncaught exception is encountered.
-
Method Details
-
handle
@Nonnull MarshaledResponse handle(@Nonnull Request request, @Nonnull Throwable throwable, @Nullable ResourceMethod resourceMethod) Prepares a response for scenarios in which an uncaught exception is encountered.Detailed documentation is available at https://www.soklet.com/docs/response-writing#uncaught-exceptions.
- Parameters:
request- the HTTP requestthrowable- the exception that was thrownresourceMethod- the Resource Method that would have handled the request, if available- Returns:
- the response to be sent over the wire
-