Package io.github.jirkasa.servletrouter
Class ErrorController<Request extends javax.servlet.ServletRequest,Response extends javax.servlet.ServletResponse>
java.lang.Object
io.github.jirkasa.servletrouter.Controller<Request,Response>
io.github.jirkasa.servletrouter.ErrorController<Request,Response>
- Type Parameters:
Request
- Type of ServletRequest.Response
- Type of ServletResponse.
- Direct Known Subclasses:
HttpErrorController
public abstract class ErrorController<Request extends javax.servlet.ServletRequest,Response extends javax.servlet.ServletResponse>
extends Controller<Request,Response>
Represents
Controller
that can be set to Router
using registerErrorController
method. It then catches any exceptions in the router's handle method.-
Constructor Summary
-
Method Summary
Methods inherited from class io.github.jirkasa.servletrouter.Controller
forwardTo, getPathParam, handle
-
Constructor Details
-
ErrorController
Creates new error controller.- Parameters:
exception
- Exception that the controller should process.
-
-
Method Details
-
getException
Returns catched exception.- Returns:
- Catched exception.
-