Logo Search packages:      
Sourcecode: wims version File versions  Download package

ParserException.java

package SharpTools;
/*
 * @(#)ParserException.java
 * 
 * $Id: ParserException.java,v 1.6 2000/11/18 07:12:17 huaz Exp $
 * 
 * Created on October 28, 2000, 6:26 PM
 */

/**
 * This Exception is raised when Formula fails in tokenizing or parsing the
 * formula.
 *
 * @author Hua Zhong <huaz@cs.columbia.edu>
 * @version $Revision: 1.6 $
 */
00017 public class ParserException extends Exception {
    private boolean quiet;
    private String msg;

    /**
     * Contructor for ParserException.  By default, sets quiet to true.
     */
00024     public ParserException() { quiet = true; };

    /**
     * @param msg the error message string 
     */
00029     public ParserException(String msg) { super(msg); this.msg = msg; };

    /**
     * @param msg the error object
     */
00034     public ParserException(Object msg) {
      super(msg.toString());
      this.msg = msg.toString();
    };

    /**
     * This returns the value of quiet.
     *
     * @return true if quiet is true, false otherwise
     */
00044     public boolean isQuiet() { return quiet; }

    /**
     * toString method for ParserException.
     *
     * @return the error message string
     */
00051     public String toString() { return msg; }
}











Generated by  Doxygen 1.6.0   Back to index