Interface IXServletExceptionHandler

  • All Superinterfaces:
    com.helger.commons.callback.ICallback, Serializable
    All Known Implementing Classes:
    XServletLoggingExceptionHandler
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface IXServletExceptionHandler
    extends com.helger.commons.callback.ICallback
    High level exception handler for XServlet.
    Since:
    9.0.0
    Author:
    Philip Helger
    • Method Detail

      • onException

        @Nonnull
        com.helger.commons.state.EContinue onException​(@Nonnull
                                                       com.helger.web.scope.IRequestWebScope aRequestScope,
                                                       @Nonnull
                                                       Throwable t)
        Invoked upon an exception. This handler can stop the propagation of an exception e.g by creating a "clean" HTML response instead of showing the stack trace. In this case the unified response provided as a parameter must be filled.
        Parameters:
        aRequestScope - Current request scope incl. http response object. Never null.
        t - The thrown exception. Never null.
        Returns:
        EContinue.CONTINUE if further exception handlers should be invoked, EContinue.BREAK if the exception was finally handled.