Class ExceptionHandlerImpl<T extends Exception>
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 handlevoidexceptionClass(Class<? extends T> exceptionClass) Sets the type of exception that this filter will handleabstract voidInvoked when an exception that is mapped to this handler occurs during routing
-
Field Details
-
exceptionClass
-
-
Constructor Details
-
ExceptionHandlerImpl
-
-
Method Details
-
exceptionClass
-
exceptionClass
-
handle
Invoked when an exception that is mapped to this handler occurs during routing- Specified by:
handlein 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
-