public class DefaultErrorHandler extends Object implements ErrorHandler
| Constructor and Description |
|---|
DefaultErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Context ctx,
Throwable cause,
StatusCode code)
Produces an error response using the given exception and status code.
|
DefaultErrorHandler |
mute(Class<? extends Exception>... exceptionTypes)
Generate a log.debug call if any of the exception types occurs.
|
DefaultErrorHandler |
mute(StatusCode... statusCodes)
Generate a log.debug call if any of the status code error occurs as exception.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, errorMessage, then@Nonnull public DefaultErrorHandler mute(@Nonnull StatusCode... statusCodes)
statusCodes - Status codes to mute.@Nonnull public DefaultErrorHandler mute(@Nonnull Class<? extends Exception>... exceptionTypes)
exceptionTypes - Exception types to mute.@Nonnull public void apply(@Nonnull Context ctx, @Nonnull Throwable cause, @Nonnull StatusCode code)
ErrorHandlerapply in interface ErrorHandlerctx - Web context.cause - Application error.code - Status code.Copyright © 2020. All rights reserved.