public abstract class ExceptionHandlerImpl<T extends Exception> extends Object implements ExceptionHandler<T>
| Modifier and Type | Field and Description |
|---|---|
protected Class<? extends T> |
exceptionClass
Holds the type of exception that this filter will handle
|
| Constructor and Description |
|---|
ExceptionHandlerImpl(Class<T> exceptionClass)
Initializes the filter with the provided exception type
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends T> |
exceptionClass()
Returns type of exception that this filter will handle
|
void |
exceptionClass(Class<? extends T> exceptionClass)
Sets the type of exception that this filter will handle
|
abstract void |
handle(T exception,
Request request,
Response response)
Invoked when an exception that is mapped to this handler occurs during routing
|
public Class<? extends T> exceptionClass()
public void exceptionClass(Class<? extends T> exceptionClass)
exceptionClass - Type of exceptionpublic abstract void handle(T exception, Request request, Response response)
handle in interface ExceptionHandler<T extends Exception>exception - The exception that was thrown during routingrequest - The request object providing information about the HTTP requestresponse - The response object providing functionality for modifying the responseCopyright © 2017. All rights reserved.