src/main/java/js/container/ManagedProxyHandler.java
private static Throwable throwable(Throwable throwable, String message, Object... args) {
		Throwable t = throwable;
		if (t instanceof InvocationException && t.getCause() != null) {
			t = t.getCause();
		}
		if (t instanceof InvocationTargetException && ((InvocationTargetException)t).getTargetException() != null) {
			t = ((InvocationTargetException) t).getTargetException();
		}
		message = String.format(message, args);
		log.dump(message, t);
		return t;
	}
private static Throwable throwable(Throwable throwable, String message, Object... args) {
		Throwable t = throwable;
		if (t instanceof InvocationException && t.getCause() != null) {
			t = t.getCause();
		}
		if (t instanceof InvocationTargetException && ((InvocationTargetException)t).getTargetException() != null) {
			t = ((InvocationTargetException) t).getTargetException();
		}
		message = String.format(message, args);
		log.dump(message, t);
		return t;
	}
private static Throwable throwable ( Throwable throwable , String message , Object ... args ) { Throwable t = throwable ; if ( t instanceof InvocationException && t . getCause ( ) != null ) { t = t . getCause ( ) ; } if ( t instanceof InvocationTargetException && ( ( InvocationTargetException ) t ) . getTargetException ( ) != null ) { t = ( ( InvocationTargetException ) t ) . getTargetException ( ) ; } message = String . format ( message , args ) ; log . dump ( message , t ) ; return t ; }
Prepare given throwable and dump it to logger with formatted message. Return prepared throwable. If throwable is
{@link InvocationTargetException} or its unchecked related version, {@link InvocationException} replace it with root
cause.

@param throwable throwable instance,
@param message formatted error message,
@param args optional formatted message arguments.
@return prepared throwable.
Prepare given throwable and dump it to logger with formatted message . Return prepared throwable . If throwable is { @link InvocationTargetException } or its unchecked related version { @link InvocationException } replace it with root cause .