You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/01/13 00:29:28 UTC

svn commit: r611506 - /myfaces/core/trunk/api/src/main/java/javax/faces/FacesException.java

Author: skitching
Date: Sat Jan 12 15:29:16 2008
New Revision: 611506

URL: http://svn.apache.org/viewvc?rev=611506&view=rev
Log:
MYFACES-1802 Make code java1.3-compatible.

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/FacesException.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/FacesException.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/FacesException.java?rev=611506&r1=611505&r2=611506&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/FacesException.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/FacesException.java Sat Jan 12 15:29:16 2008
@@ -20,23 +20,33 @@
 
 /**
  * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/index.html">JSF Specification</a>
- *
+ * 
+ * 
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
 public class FacesException
         extends RuntimeException
 {
-	private static final long serialVersionUID = 6592152487577416317L;
+	private static final long serialVersionUID = 1L;
 
-	public FacesException()
+    /**
+     * The cause of this exception, i.e. the Throwable that caused this exception to be thrown.
+     *<p>
+     * Note that JSF1.1 is required to be compatible with java 1.3; so no "exception chaining"
+     * support can be assumed in the base RuntimeException class. Here it is emulated so that
+     * in a java-1.4 (or later) environment this class works like other exceptions.
+     */
+    private Throwable cause;
+
+    public FacesException()
     {
         super();
     }
 
     public FacesException(Throwable cause)
     {
-        super(cause);
+        this.cause = cause;
     }
 
     public FacesException(String message)
@@ -47,11 +57,12 @@
     public FacesException(String message,
                           Throwable cause)
     {
-        super(message, cause);
+        super(message);
+        this.cause = cause;
     }
 
     public Throwable getCause()
     {
-        return super.getCause();
+        return cause;
     }
 }