You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tiles.apache.org by ap...@apache.org on 2007/02/26 14:07:33 UTC

svn commit: r511795 - /tiles/framework/trunk/tiles-api/src/main/java/org/apache/tiles/TilesException.java

Author: apetrelli
Date: Mon Feb 26 05:07:32 2007
New Revision: 511795

URL: http://svn.apache.org/viewvc?view=rev&rev=511795
Log:
Removed the useless "exception" field, since it is duplicated by the "cause" field of Throwable.

Modified:
    tiles/framework/trunk/tiles-api/src/main/java/org/apache/tiles/TilesException.java

Modified: tiles/framework/trunk/tiles-api/src/main/java/org/apache/tiles/TilesException.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-api/src/main/java/org/apache/tiles/TilesException.java?view=diff&rev=511795&r1=511794&r2=511795
==============================================================================
--- tiles/framework/trunk/tiles-api/src/main/java/org/apache/tiles/TilesException.java (original)
+++ tiles/framework/trunk/tiles-api/src/main/java/org/apache/tiles/TilesException.java Mon Feb 26 05:07:32 2007
@@ -29,20 +29,11 @@
  */
 public class TilesException extends Exception {
 
-
-    /**
-     * Any "wrapped" exception will be exposed when this is serialized.
-     *
-     * @serial
-     */
-    private Exception exception;
-
     /**
      * Constructor.
      */
     public TilesException() {
         super();
-        this.exception = null;
     }
 
     /**
@@ -52,7 +43,6 @@
      */
     public TilesException(String message) {
         super(message);
-        this.exception = null;
     }
 
 
@@ -66,8 +56,7 @@
      * @param e The exception to be wrapped.
      */
     public TilesException(Exception e) {
-        super();
-        this.exception = e;
+        super(e);
     }
 
 
@@ -81,38 +70,6 @@
      * @param e       The exception to be wrapped.
      */
     public TilesException(String message, Exception e) {
-        super(message);
-        this.exception = e;
-    }
-
-
-    /**
-     * Return a detail message for this exception.
-     * <p/>
-     * <p>If there is a embedded exception, and if the TilesException
-     * has no detail message of its own, this method will return
-     * the detail message from the embedded exception.</p>
-     *
-     * @return The error or warning message.
-     */
-    public String getMessage() {
-        String message = super.getMessage();
-
-        if (message == null && exception != null) {
-            return exception.getMessage();
-        } else {
-            return message;
-        }
+        super(message, e);
     }
-
-
-    /**
-     * Return the embedded exception, if any.
-     *
-     * @return The embedded exception, or <code>null</code> if there is none.
-     */
-    public Exception getException() {
-        return exception;
-    }
-
 }