[EMAIL PROTECTED] wrote:
epugh 2003/09/28 10:35:45

Modified: src/java/org/apache/turbine/util/velocity
VelocityActionEvent.java
Log:
Throw the exception when an an action event doXXX has an error.
Revision Changes Path
1.19 +2 -1 jakarta-turbine-2/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java
Index: VelocityActionEvent.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- VelocityActionEvent.java 20 Aug 2003 10:58:28 -0000 1.18
+++ VelocityActionEvent.java 28 Sep 2003 17:35:45 -0000 1.19
@@ -189,6 +189,7 @@
{
Throwable t = ite.getTargetException();
log.error("Invokation of " + method , t);
+ throw ite;
}
finally
{


I'm much more interested in the target exception "t" than I am in its wrapper exception "ite". I've written this code in the past as a loop, something like (don't recall my exact syntax):

 Throwable t = ite;
 while (!(t = t.getTargetException()) instanceof InvocationTargetException);

The InvocationTargetException wrapper does not in itself provide that much information. You could log _it_ at the DEBUG level, and throw the _root_ exception it's wrapping.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to