java.lang.Object
spark.ExceptionHandlerImpl<T>
- All Implemented Interfaces:
ExceptionHandler<T>
public abstract class ExceptionHandlerImpl<T extends Exception>
extends Object
implements ExceptionHandler<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionHolds the type of exception that this filter will handle -
Constructor Summary
ConstructorsConstructorDescriptionExceptionHandlerImpl
(Class<T> exceptionClass) Initializes the filter with the provided exception type -
Method Summary
Modifier and TypeMethodDescriptionReturns type of exception that this filter will handlevoid
exceptionClass
(Class<? extends T> exceptionClass) Sets the type of exception that this filter will handleabstract void
Invoked when an exception that is mapped to this handler occurs during routing
-
Field Details
-
exceptionClass
Holds the type of exception that this filter will handle
-
-
Constructor Details
-
ExceptionHandlerImpl
Initializes the filter with the provided exception type- Parameters:
exceptionClass
- Type of exception
-
-
Method Details
-
exceptionClass
Returns type of exception that this filter will handle- Returns:
- Type of exception
-
exceptionClass
Sets the type of exception that this filter will handle- Parameters:
exceptionClass
- Type of exception
-
handle
Invoked when an exception that is mapped to this handler occurs during routing- Specified by:
handle
in interfaceExceptionHandler<T extends Exception>
- Parameters:
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 response
-