public interface ServerErrorHandler
Context.error(Throwable)| Modifier and Type | Field and Description |
|---|---|
static com.google.common.reflect.TypeToken<ServerErrorHandler> |
TYPE
A type token for this type.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
error(Context context,
InvalidPathEncodingException exception)
Processes the given request path encoding error that occurred processing the given context.
|
void |
error(Context context,
java.lang.Throwable throwable)
Processes the given exception that occurred processing the given context.
|
static final com.google.common.reflect.TypeToken<ServerErrorHandler> TYPE
@NonBlocking void error(Context context, java.lang.Throwable throwable) throws java.lang.Exception
Implementations should strive to avoid throwing exceptions. If exceptions are thrown, they will just be logged at a warning level and the response will be finalised with a 500 error code and empty body.
context - The context being processedthrowable - The throwable that occurredjava.lang.Exception - if something goes wrong handling the error@NonBlocking default void error(Context context, InvalidPathEncodingException exception) throws java.lang.Exception
Implementations should strive to avoid throwing exceptions. If exceptions are thrown, they will just be logged at a warning level and the response will be finalised with a 500 error code and empty body.
context - The context being processedexception - The path encoding error that occurredjava.lang.Exception - if something goes wrong handling the error