You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by pi...@apache.org on 2004/11/01 15:58:42 UTC

svn commit: rev 56236 - cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/runtime

Author: pier
Date: Mon Nov  1 06:58:41 2004
New Revision: 56236

Modified:
   cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/runtime/Wiring.java
Log:
Make sure exceptions target-exceptions are re-thrown and not wrapped

Modified: cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/runtime/Wiring.java
==============================================================================
--- cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/runtime/Wiring.java	(original)
+++ cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/runtime/Wiring.java	Mon Nov  1 06:58:41 2004
@@ -13,6 +13,7 @@
 package org.apache.cocoon.kernel.runtime;
 
 import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
 /**
@@ -40,6 +41,12 @@
      */
     public Object invoke(Object proxy, Method method, Object[] parameters)
     throws Throwable {
-        return(method.invoke(null, parameters));
+        try {
+            return(method.invoke(this.instance, parameters));
+        } catch (InvocationTargetException e) {
+            Throwable cause = e.getCause();
+            if (cause != null) throw cause;
+            throw e;
+        }
     }
 }