notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r903 - trunk/main/metro/part/api/src/main/net/dpml/part
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r903 - trunk/main/metro/part/api/src/main/net/dpml/part
- Date: Wed, 11 Jan 2006 07:06:39 +0100
Author: mcconnell
Date: 2006-01-11 07:06:36 +0100 (Wed, 11 Jan 2006)
New Revision: 903
Modified:
trunk/main/metro/part/api/src/main/net/dpml/part/ControlException.java
Log:
radd support for access to the root cause of a control exception
Modified:
trunk/main/metro/part/api/src/main/net/dpml/part/ControlException.java
===================================================================
--- trunk/main/metro/part/api/src/main/net/dpml/part/ControlException.java
2006-01-11 05:54:18 UTC (rev 902)
+++ trunk/main/metro/part/api/src/main/net/dpml/part/ControlException.java
2006-01-11 06:06:36 UTC (rev 903)
@@ -65,5 +65,32 @@
{
return m_uri;
}
+
+ /**
+ * Iterates through exceptiion to locate the root causal exception.
+ * @return the root exception (possibly null)
+ */
+ public Throwable getRootCause()
+ {
+ Throwable cause = getCause();
+ if( null == cause )
+ {
+ return null;
+ }
+ else
+ {
+ while( true )
+ {
+ if( null == cause.getCause() )
+ {
+ return cause;
+ }
+ else
+ {
+ cause = cause.getCause();
+ }
+ }
+ }
+ }
}
- r903 - trunk/main/metro/part/api/src/main/net/dpml/part, mcconnell at BerliOS, 01/11/2006
Archive powered by MHonArc 2.6.24.