in src/main/java/org/apache/geronimo/jcache/simple/ExceptionWrapperHandler.java [43:62]
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
if (AutoCloseable.class == method.getDeclaringClass() && !AutoCloseable.class.isInstance(delegate)) {
return null;
}
try {
return method.invoke(delegate, args);
} catch (final InvocationTargetException ite) {
final Throwable e = ite.getCause();
if (RuntimeException.class.isInstance(e)) {
final RuntimeException re;
try {
re = wrapper.newInstance(e);
} catch (final Exception e1) {
throw new IllegalArgumentException(e1);
}
throw re;
}
throw e;
}
}