InstanceExceptionHandlerEntryWithThrowable

internal data class InstanceExceptionHandlerEntryWithThrowable(val target: WeakReference<Any>, val invoker: InstanceExceptionInvokers, val priority: Int, val throwableType: Class<out Throwable>) : ExceptionHandlerEntryWithThrowable

Internal representation of an instance-bound exception handler that declares a throwable parameter.

This entry corresponds to @ExceptionHandler methods on subscriber instances with one of the following shapes:

  • (event: Event, throwable: Throwable)

  • (throwable: Throwable)

The subscriber instance is held via a WeakReference, allowing it to be garbage-collected without requiring an explicit unsubscribe call. When the reference clears, the entry is treated as invalid and can be removed during cache maintenance.

The throwableType property records the declared throwable parameter type (e.g. IOException, RuntimeException, Throwable). During dispatch, the event system only invokes this handler when:

  • the event type is compatible (based on the event-method cache key and hierarchy traversal), and

  • throwableType.isInstance(thrown) is true.

Constructors

constructor(target: WeakReference<Any>, invoker: InstanceExceptionInvokers, priority: Int, throwableType: Class<out Throwable>)

Properties

Link copied to clipboard

the compiled InstanceExceptionInvokers strategy used to invoke the handler on target.

Link copied to clipboard
open override val priority: Int

execution ordering hint; higher values are invoked before lower values when multiple handlers match the same failure.

Link copied to clipboard

a weak reference to the subscriber instance that owns the exception handler method.

Link copied to clipboard
open override val throwableType: Class<out Throwable>

the declared throwable parameter type used to filter which exceptions this handler should receive.

Functions

Link copied to clipboard

Computes a relative "specificity" rank for this exception handler entry.