openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1445936 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/AbstractInvocationContext.java
Date Wed, 13 Feb 2013 21:25:00 GMT
Author: struberg
Date: Wed Feb 13 21:25:00 2013
New Revision: 1445936

URL: http://svn.apache.org/r1445936
Log:
OWB-344 properly unwrap InvocationTargetException

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/AbstractInvocationContext.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/AbstractInvocationContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/AbstractInvocationContext.java?rev=1445936&r1=1445935&r2=1445936&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/AbstractInvocationContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/AbstractInvocationContext.java
Wed Feb 13 21:25:00 2013
@@ -18,12 +18,15 @@
  */
 package org.apache.webbeans.intercept;
 
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.Map;
 
 import javax.interceptor.InvocationContext;
 
+import org.apache.webbeans.util.ExceptionUtil;
+
 public abstract class AbstractInvocationContext<T> implements InvocationContext
 {
 
@@ -93,6 +96,14 @@ public abstract class AbstractInvocation
     @Override
     public Object proceed() throws Exception
     {
-        return method.invoke(target, parameters);
+        try
+        {
+            return method.invoke(target, parameters);
+        }
+        catch (InvocationTargetException ite)
+        {
+            // unpack the reflection Exception
+            throw ExceptionUtil.throwAsRuntimeException(ite.getCause());
+        }
     }
 }



Mime
View raw message