jodd-core/src/main/java/jodd/exception/ExceptionUtil.java
public static Throwable unwrapThrowable(final Throwable wrappedThrowable) {
		Throwable unwrapped = wrappedThrowable;
		while (true) {
			if (unwrapped instanceof InvocationTargetException) {
				unwrapped = ((InvocationTargetException) unwrapped).getTargetException();
			}
			else if (unwrapped instanceof UndeclaredThrowableException) {
				unwrapped = ((UndeclaredThrowableException) unwrapped).getUndeclaredThrowable();
			}
			else {
				return unwrapped;
			}
		}
	}
public static Throwable unwrapThrowable(final Throwable wrappedThrowable) {
		Throwable unwrapped = wrappedThrowable;
		while (true) {
			if (unwrapped instanceof InvocationTargetException) {
				unwrapped = ((InvocationTargetException) unwrapped).getTargetException();
			}
			else if (unwrapped instanceof UndeclaredThrowableException) {
				unwrapped = ((UndeclaredThrowableException) unwrapped).getUndeclaredThrowable();
			}
			else {
				return unwrapped;
			}
		}
	}
public static Throwable unwrapThrowable ( final Throwable wrappedThrowable ) { Throwable unwrapped = wrappedThrowable ; while ( true ) { if ( unwrapped instanceof InvocationTargetException ) { unwrapped = ( ( InvocationTargetException ) unwrapped ) . getTargetException ( ) ; } else if ( unwrapped instanceof UndeclaredThrowableException ) { unwrapped = ( ( UndeclaredThrowableException ) unwrapped ) . getUndeclaredThrowable ( ) ; } else { return unwrapped ; } } }
Unwraps invocation and undeclared exceptions to real cause.
Unwraps invocation and undeclared exceptions to real cause .