You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2003/07/18 23:07:02 UTC
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/acting AbstractMultiAction.java
stephan 2003/07/18 14:07:02
Modified: src/java/org/apache/cocoon/acting AbstractMultiAction.java
Log:
Remove wrapper exception, which holds no additional information.
Revision Changes Path
1.5 +11 -2 cocoon-2.1/src/java/org/apache/cocoon/acting/AbstractMultiAction.java
Index: AbstractMultiAction.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/acting/AbstractMultiAction.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractMultiAction.java 6 May 2003 09:47:23 -0000 1.4
+++ AbstractMultiAction.java 18 Jul 2003 21:07:02 -0000 1.5
@@ -61,6 +61,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Enumeration;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
@@ -136,7 +137,15 @@
if((actionMethod != null) && (actionMethod.length() > 0)) {
Method method = (Method) methodIndex.get(actionMethod);
if (method != null) {
- return ((Map) method.invoke(this, new Object[]{redirector, resolver, objectModel, source, parameters}));
+ try {
+ return ((Map) method.invoke(this, new Object[]{redirector, resolver, objectModel, source, parameters}));
+ } catch (InvocationTargetException ite) {
+ if ((ite.getTargetException()!=null) && (ite instanceof Exception)) {
+ throw (Exception)ite.getTargetException();
+ } else {
+ throw ite;
+ }
+ }
} else {
throw new Exception("action has no method \"" + actionMethod + "\"");
}