Author: matt.drees
Date: 2008-09-02 00:53:02 -0400 (Tue, 02 Sep 2008)
New Revision: 8873
Modified:
trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java
Log:
JBSEAM-3362
add context info even if CyclicDependencyException is wrapped by another exception
Modified: trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java 2008-09-01 22:50:56 UTC
(rev 8872)
+++ trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java 2008-09-02 04:53:02 UTC
(rev 8873)
@@ -8,6 +8,7 @@
import org.jboss.seam.annotations.intercept.Interceptor;
import org.jboss.seam.intercept.AbstractInterceptor;
import org.jboss.seam.intercept.InvocationContext;
+import org.jboss.seam.util.EJB;
/**
* Before invoking the component, inject all dependencies. After
@@ -103,10 +104,19 @@
return result;
}
- catch (CyclicDependencyException cyclicDependencyException)
+ catch (Exception e)
{
- cyclicDependencyException.addInvocation(getComponent().getName(),
invocation.getMethod());
- throw cyclicDependencyException;
+ Exception root = e;
+ while (EJB.getCause(root) != null)
+ {
+ root = EJB.getCause(root);
+ }
+ if (root instanceof CyclicDependencyException)
+ {
+ CyclicDependencyException cyclicDependencyException =
(CyclicDependencyException) root;
+ cyclicDependencyException.addInvocation(getComponent().getName(),
invocation.getMethod());
+ }
+ throw e;
}
finally
{
Show replies by date