Index: src/java/ognl/OgnlException.java =================================================================== --- src/java/ognl/OgnlException.java (revision 141) +++ src/java/ognl/OgnlException.java (working copy) @@ -43,12 +43,6 @@ */ private Evaluation evaluation; - /** - * Why this exception was thrown. - * @serial - */ - private Throwable reason; - /** Constructs an OgnlException with no message or encapsulated exception. */ public OgnlException() { @@ -71,8 +65,7 @@ */ public OgnlException( String msg, Throwable reason ) { - super( msg ); - this.reason = reason; + super( msg, reason ); } /** @@ -81,7 +74,7 @@ */ public Throwable getReason() { - return reason; + return getCause(); } /** @@ -101,58 +94,4 @@ evaluation = value; } - /** - * Returns a string representation of this exception. - * @return a string representation of this exception - */ - public String toString() - { - if ( reason == null ) - return super.toString(); - return super.toString() + " [" + reason + "]"; - } - - - /** - * Prints the stack trace for this (and possibly the encapsulated) exception on - * System.err. - */ - public void printStackTrace() - { - printStackTrace( System.err ); - } - - /** - * Prints the stack trace for this (and possibly the encapsulated) exception on the - * given print stream. - */ - public void printStackTrace(java.io.PrintStream s) - { - synchronized (s) - { - super.printStackTrace(s); - if ( reason != null ) { - s.println( "/-- Encapsulated exception ------------\\" ); - reason.printStackTrace(s); - s.println( "\\--------------------------------------/" ); - } - } - } - - /** - * Prints the stack trace for this (and possibly the encapsulated) exception on the - * given print writer. - */ - public void printStackTrace(java.io.PrintWriter s) - { - synchronized (s) - { - super.printStackTrace(s); - if ( reason != null ) { - s.println( "/-- Encapsulated exception ------------\\" ); - reason.printStackTrace(s); - s.println( "\\--------------------------------------/" ); - } - } - } }