Package com.blackrook.small.roles
Interface ExceptionHandler<E extends Throwable>
- Type Parameters:
E
- the exception type.
public interface ExceptionHandler<E extends Throwable>
Describes a view resolution driver for Small.
- Author:
- Matthew Tropiano
-
Method Summary
Modifier and TypeMethodDescriptionGets the exception class that this handles.void
handleException
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, E exception) Called when an exception needs handling when thrown from a controller.
-
Method Details
-
getHandledClass
Gets the exception class that this handles. This is necessary as method parameter type erasure occurs when classes are compiled without debugging information, and thus is lost when packaging applications in most cases.This method is called during environment construction.
- Returns:
- the handled class.
- Since:
- 1.5.0
-
handleException
void handleException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, E exception) Called when an exception needs handling when thrown from a controller.- Parameters:
request
- the HTTP request object.response
- the HTTP response object.exception
- the exception caught.
-