return ec.methodException(o.getClass(), vg.getMethodName(),
(Exception)ite.getTargetException());
}
catch(Exception e)
{
throw new MethodInvocationException(
"Invocation of method '" + vg.getMethodName() + "'"
+ " in " + o.getClass()
+ " threw exception "
+ ite.getTargetException().getClass() + " : "
+ ite.getTargetException().getMessage(),
ite.getTargetException(), vg.getMethodName());
}
}
else
{
/*
* no event cartridge to override. Just throw
*/
throw new MethodInvocationException(
"Invocation of method '" + vg.getMethodName() + "'"
+ " in " + o.getClass()
+ " threw exception "
+ ite.getTargetException().getClass() + " : "
+ ite.getTargetException().getMessage(),