[jboss-cvs] jboss-seam/src/debug/org/jboss/seam/debug ...
Gavin King
gavin.king at jboss.com
Thu May 17 19:30:13 EDT 2007
User: gavin
Date: 07/05/17 19:30:13
Modified: src/debug/org/jboss/seam/debug Contexts.java
Log:
unwrap exceptions
Revision Changes Path
1.3 +11 -0 jboss-seam/src/debug/org/jboss/seam/debug/Contexts.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Contexts.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/debug/org/jboss/seam/debug/Contexts.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Contexts.java 9 Mar 2007 02:37:25 -0000 1.2
+++ Contexts.java 17 May 2007 23:30:13 -0000 1.3
@@ -12,6 +12,7 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.ConversationEntries;
import org.jboss.seam.core.ConversationEntry;
+import org.jboss.seam.util.EJB;
@Name("org.jboss.seam.debug.contexts")
@Scope(ScopeType.APPLICATION)
@@ -63,6 +64,16 @@
return (Exception) org.jboss.seam.contexts.Contexts.getConversationContext().get("org.jboss.seam.exception");
}
+ public List<Exception> getExceptionCauses()
+ {
+ List<Exception> causes = new ArrayList<Exception>();
+ for (Exception cause=getException(); cause!=null; cause=EJB.getCause(cause))
+ {
+ causes.add(cause);
+ }
+ return causes;
+ }
+
public boolean isExceptionExists()
{
return getException()!=null;
More information about the jboss-cvs-commits
mailing list