getThrowableType

Extracts the declared throwable parameter type from an exception–handler method, when applicable.

Exception handlers may declare one of the following supported signatures:

This function inspects the reflective method and returns:

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

method

the reflective method from which to extract the throwable type.