[seam-commits] Seam SVN: r8873 - trunk/src/main/org/jboss/seam/core.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Sep 2 00:53:02 EDT 2008
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
{
More information about the seam-commits
mailing list