spring-framework / org.springframework.util / ReflectionUtils / handleReflectionException

handleReflectionException

open static fun handleReflectionException(ex: Exception): Unit

Handle the given reflection exception. Should only be called if no checked exception is expected to be thrown by the target method.

Throws the underlying RuntimeException or Error in case of an InvocationTargetException with such a root cause. Throws an IllegalStateException with an appropriate message or UndeclaredThrowableException otherwise.

Parameters

ex - the reflection exception to handle