public class ThrowableUnwrappingKt
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Throwable |
unwrapIfReflectionCall(java.lang.Throwable $receiver)
In some particular cases, such as AnnotationSpec, a call will be made using Reflection.
When using reflection, any error will be wrapped around a InvocationTargetException, as explained
in https://stackoverflow.com/questions/6020719/what-could-cause-java-lang-reflect-invocationtargetexception
By verifying if this is an InvocationTargetException, we can unwrap it and throw the cause instead
|
public static java.lang.Throwable unwrapIfReflectionCall(java.lang.Throwable $receiver)
In some particular cases, such as AnnotationSpec, a call will be made using Reflection. When using reflection, any error will be wrapped around a InvocationTargetException, as explained in https://stackoverflow.com/questions/6020719/what-could-cause-java-lang-reflect-invocationtargetexception By verifying if this is an InvocationTargetException, we can unwrap it and throw the cause instead