001 package com.sptci.echo2;
002
003 /**
004 * A custom exception that is used to wrap any exception/error
005 * condition that is encountered while binding UI and JavaBean
006 * components.
007 *
008 * <p>Copyright 2006 Sans Pareil Technologies, Inc.</p>
009 * @author Rakesh Vidyadharan 2006-01-28
010 * @version $Id: BindingException.java,v 1.1 2006/02/06 00:32:42 rakesh Exp $
011 */
012 public class BindingException extends RuntimeException
013 {
014 /**
015 * Constructs a new exception with null as its detail message. The
016 * cause is not initialized, and may subsequently be initialized by
017 * a call to <code>Throwable.initCause(java.lang.Throwable)</code>. o
018 * Just uses the super-class constructor.
019 */
020 public BindingException()
021 {
022 super();
023 }
024
025 /**
026 * Constructs a new exception with the specified detail message. The
027 * cause is not initialized, and may subsequently be initialized by
028 * a call to <code>Throwable.initCause(java.lang.Throwable)</code>.
029 * Just calls the corresponding super-class constructor.
030 *
031 * @param message - The detail message. The detail message is
032 * saved for later retrieval by the Throwable.getMessage() method.
033 */
034 public BindingException( String message )
035 {
036 super( message );
037 }
038
039 /**
040 * Constructs a new exception with the specified detail message and
041 * cause. Just uses the appropriate super-class constructor.
042 *
043 * <p>Note that the detail message associated with cause is not
044 * automatically incorporated in this exception's detail message.</p>
045 *
046 * @param message - The detail message. The detail message is
047 * saved for later retrieval by the Throwable.getMessage() method.
048 * @param cause - The cause (which is saved for later
049 * retrieval by the Throwable.getCause() method). (A null value is
050 * permitted, and indicates that the cause is nonexistent or
051 * unknown.)
052 */
053 public BindingException( String message, Throwable cause )
054 {
055 super( message, cause );
056
057 }
058
059 /**
060 * Constructs a new exception with the specified cause. The detail
061 * message is set as <code>( cause==null ? null : cause.toString() )
062 * </code> (which typically contains the class and detail message of
063 * cause). This constructor is useful for exceptions that are little
064 * more than wrappers for other throwables (for example,
065 * PrivilegedActionException). Just uses the appropriate super-class
066 * constructor.
067 *
068 * @param cause - The cause (which is saved for later
069 * retrieval by the Throwable.getCause() method). (A null value is
070 * permitted, and indicates that the cause is nonexistent or
071 * unknown.)
072 */
073 public BindingException( Throwable cause )
074 {
075 super( cause.getMessage(), cause );
076 }
077 }