get Throwable Type
Extracts the declared throwable parameter type from an exception–handler method, when applicable.
Exception handlers may declare one of the following supported signatures:
(event: Event, throwable: Throwable)→ EVENT_AND_THROWABLE(throwable: Throwable)→ THROWABLE_ONLY(event: Event)→ EVENT_ONLY
This function inspects the reflective method and returns:
the method’s second parameter (the throwable type) for EVENT_AND_THROWABLE,
the method’s single parameter for THROWABLE_ONLY,
nullfor EVENT_ONLY, since these handlers do not declare a throwable.
The returned type is always a Class<out Throwable>, and is used during exception dispatch to determine whether a handler is compatible with a particular thrown exception:
handler.throwableType.isInstance(actualThrowable)Return
the declared throwable parameter type, or null if this signature kind does not include a throwable.
Parameters
the reflective method from which to extract the throwable type.