Author: skitching
Date: Sun Feb  6 23:46:37 2005
New Revision: 151699

URL: http://svn.apache.org/viewcvs?view=rev&rev=151699
Log:
Support JDKs earlier than 1.4 (ie ones that don't implement
exception-chaining).

Modified:
    
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DigestionException.java
   (contents, props changed)

Modified: 
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DigestionException.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DigestionException.java?view=diff&r1=151698&r2=151699
==============================================================================
--- 
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DigestionException.java
 (original)
+++ 
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DigestionException.java
 Sun Feb  6 23:46:37 2005
@@ -1,6 +1,6 @@
-/* $Id: $
+/* $Id$
  *
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,19 +19,31 @@
 package org.apache.commons.digester2;
 
 /**
+ * The base class from which all digester-specific exception classes inherit.
+ * <p>
+ * This class supports the concept of a "cause" exception, even on versions
+ * of java prior to 1.4 (where this became standard behaviour for exception
+ * classes). 
  */
 
 public class DigestionException extends Exception {
+    Throwable cause = null;
+    
     public DigestionException(String msg) {
         super(msg);
     }
 
     public DigestionException(String msg, Throwable t) {
-        super(msg, t);
+        super(msg);
+        cause = t;
     }
     
     public DigestionException(Throwable t) {
-        super(t);
+        cause = t;
+    }
+    
+    public Throwable getCause() {
+        return cause;
     }
 }
 

Propchange: 
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DigestionException.java
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to