ExceptionInvoker

internal sealed interface ExceptionInvoker

Marker interface for all compiled exception-handler invocation strategies.

Each method annotated with @ExceptionHandler is analyzed at subscription time and converted into a concrete invoker that efficiently calls the method. A handler's method signature determines which concrete invoker is used:

  • (event: Event, throwable: Throwable)

  • (event: Event)

  • (throwable: Throwable)

Matching of event and throwable types is polymorphic: a handler whose parameter type is a supertype of the actual event or exception will be considered compatible.

Invokers encapsulate the LambdaMetafactory or reflective fallback logic required to invoke the handler during exception dispatch.

Inheritors