package com.sptci.echo2;

/**
 * A custom exception that is used to wrap any exception/error
 * condition that is encountered while binding UI and JavaBean
 * components.
 *
 * <p>Copyright 2006 Sans Pareil Technologies, Inc.</p>
 * @author Rakesh Vidyadharan 2006-01-28
 * @version $Id: BindingException.java,v 1.1 2006/02/06 00:32:42 rakesh Exp $
 */
public class BindingException extends RuntimeException
{
  /**
   * Constructs a new exception with null as its detail message. The 
   * cause is not initialized, and may subsequently be initialized by 
   * a call to <code>Throwable.initCause(java.lang.Throwable)</code>.  o
   * Just uses the super-class constructor.
   */
  public BindingException()
  {
    super();
  }

  /**
   * Constructs a new exception with the specified detail message. The 
   * cause is not initialized, and may subsequently be initialized by 
   * a call to <code>Throwable.initCause(java.lang.Throwable)</code>.  
   * Just calls the corresponding super-class constructor.
   *
   * @param message -  The detail message. The detail message is 
   *   saved for later retrieval by the Throwable.getMessage() method.
   */
  public BindingException( String message )
  {
    super( message );
  }

  /**
   * Constructs a new exception with the specified detail message and 
   * cause.  Just uses the appropriate super-class constructor.
   *
   * <p>Note that the detail message associated with cause is not 
   * automatically incorporated in this exception's detail message.</p>
   *
   * @param message -  The detail message. The detail message is 
   *   saved for later retrieval by the Throwable.getMessage() method.
   * @param cause - The cause (which is saved for later 
   *   retrieval by the Throwable.getCause() method). (A null value is 
   *   permitted, and indicates that the cause is nonexistent or 
   *   unknown.)
   */
  public BindingException( String message, Throwable cause )
  {
    super( message, cause );

  }

  /**
   * Constructs a new exception with the specified cause. The detail 
   * message is set as <code>( cause==null ? null : cause.toString() )
   * </code> (which typically contains the class and detail message of 
   * cause).  This constructor is useful for exceptions that are little 
   * more than wrappers for other throwables (for example, 
   * PrivilegedActionException).  Just uses the appropriate super-class
   * constructor.
   *
   * @param cause - The cause (which is saved for later 
   *   retrieval by the Throwable.getCause() method). (A null value is 
   *   permitted, and indicates that the cause is nonexistent or 
   *   unknown.)
   */
  public BindingException( Throwable cause )
  {
    super( cause.getMessage(), cause );
  }
}
