public interface ServerErrorHandler
Context.error(Throwable)
Modifier and Type | Field and Description |
---|---|
static TypeToken<ServerErrorHandler> |
TYPE
A type token for this type.
|
Modifier and Type | Method and Description |
---|---|
void |
error(Context context,
Throwable throwable)
Processes the given exception that occurred processing the given context.
|
static final TypeToken<ServerErrorHandler> TYPE
@NonBlocking void error(Context context, Throwable throwable) throws 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 occurredException
- if something goes wrong handling the error