Interface HttpExceptionHandler

  • 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 HttpExceptionHandler
    A lambda "catch-all" for handling exceptions during HTTP-Request processing.
    • Method Detail

      • onHttpError

        void onHttpError​(RestRequestEvent aRequestEvent,
                         org.refcodes.net.HttpServerResponse aHttpServerResponse,
                         Exception aException,
                         org.refcodes.net.HttpStatusCode aHttpStatusCode)
        Invoked upon thrown Exception instances whilst processing HTTP-Requests. Process the HTTP-Response as of what you get from the HTTP-Request
        Parameters:
        aRequestEvent - The HTTP-Request related to the Exception.
        aHttpServerResponse - The HTTP-Response to be worked with.
        aException - The Exception involved in the problem.
        aHttpStatusCode - The HTTP-Error-Code (if known) identified.