/*
 * COPYRIGHT (c) 1998-1999 Jan-Henrik Haukeland, http://www.tildeslash.com/
 */

package ts.config;


/**
 * Exception class for core Config.
 * 
 * @author  Jan-Henrik Haukeland
 * @version $Id: ConfigException.java,v 1.3 1999/02/21 08:47:07 hauk Exp $ 
 */ 
public class ConfigException extends Exception 
{

  private             int myStatus;
  public static final int OK=         0,
                          WARNING=    1,
                          ERROR=      2,
                          FATAL=      4;

  /** 
   * Store status. Legal values for status are public
   * constants in this class.  
   */
  public ConfigException( int status, String message) 
  {
    super(message);
    myStatus= status;
  }
  
  /** 
   * Construct a new ConfigExeption with default ERROR status
   */
  public ConfigException(String message)
  {
    this( ERROR, message );
  }
  

  /** 
   * Return status.
   */
  public int status() 
  {
    return myStatus;
  }
  
}
