Package spark

Interface ExceptionHandler<T extends java.lang.Exception>

  • All Known Implementing Classes:
    ExceptionHandlerImpl
    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 ExceptionHandler<T extends java.lang.Exception>
    Created by Per Wendel on 2014-05-10.
    • Method Detail

      • handle

        void handle​(T exception,
                    Request request,
                    Response response)
        Invoked when an exception that is mapped to this handler occurs during routing
        Parameters:
        exception - The exception that was thrown during routing
        request - The request object providing information about the HTTP request
        response - The response object providing functionality for modifying the response