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 Details

    • ErrorController

      public ErrorController(Exception exception)
      Creates new error controller.
      Parameters:
      exception - Exception that the controller should process.
  • Method Details

    • getException

      public Exception getException()
      Returns catched exception.
      Returns:
      Catched exception.