Module io.avaje.jex
Package io.avaje.jex

Interface ExceptionHandler<T extends Exception>

Type Parameters:
T - type of throwable handled by this handler
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 Exception>
The routing error handler. Can be mapped to the error cause in Routing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(Context ctx, T exception)
    Error handling consumer.
  • Method Details

    • handle

      void handle(Context ctx, T exception)
      Error handling consumer. Do not throw an exception from an error handler, it would make this error handler invalid and the exception would be ignored.
      Parameters:
      ctx - the server context
      exception - the cause of the error