public abstract class ExceptionHandlerImpl extends Object
Modifier and Type | Field and Description |
---|---|
protected Class<? extends Exception> |
exceptionClass
Holds the type of exception that this filter will handle
|
Constructor and Description |
---|
ExceptionHandlerImpl(Class<? extends Exception> exceptionClass)
Initializes the filter with the provided exception type
|
Modifier and Type | Method and Description |
---|---|
Class<? extends Exception> |
exceptionClass()
Returns type of exception that this filter will handle
|
void |
exceptionClass(Class<? extends Exception> exceptionClass)
Sets the type of exception that this filter will handle
|
abstract void |
handle(Exception exception,
Request request,
Response response)
Invoked when an exception that is mapped to this handler occurs during routing
|
public Class<? extends Exception> exceptionClass()
public void exceptionClass(Class<? extends Exception> exceptionClass)
exceptionClass
- Type of exceptionpublic abstract void handle(Exception exception, Request request, Response response)
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 © 2015. All rights reserved.