Source code for /engineering/autohit-1998/autohit/vm/VMException.javaOriginal file VMException.java
   1 /**
   2  * .
   3  * Copyright � 1999 Erich P G.
   4  *
   5  */
   6  
   7 package autohit.vm;
   8 
   9 /**
  10  * A VM exception.  The specific error is given in the numeric
  11  * field.
  12  *
  13  * @author Erich P. Gatejen
  14  * @version 1.0
  15  * <i>Version History</i>
  16  * <code>EPG - Initial - 18Jan99</code> 
  17  * 
  18  */
  19 public class VMException extends Exception {
  20 	
  21 	// --- FINAL FIELDS ------------------------------------------------------	
  22      
  23     /**
  24      *  Numeric values for the exception.
  25      */ 
  26      public static final int   UNKNOWN                 = 0;
  27      public static final int   INVALID_INSTRUCTION     = 1;
  28      public static final int   VARIABLE_NOT_DEFINED    = 2;     
  29      public static final int   SOFTWARE_DETECTED_FAULT = 3;
  30      public static final int   VARIABLE_TYPE_MISMATCH  = 4;
  31      public static final int   PREPARE_EXCEPTION       = 5;     
  32      public static final int   DONE                    = 6;     
  33      public static final int   SUBSYSTEM_FAULT         = 7;     
  34      
  35 	// --- FIELDS ------------------------------------------------------------
  36 
  37     /**
  38      *  Numeric.
  39      *  @serial
  40      */      	    
  41      public int        numeric;
  42     
  43 	// --- PUBLIC METHODS ----------------------------------------------------	
  44 
  45 
  46     /**
  47      *  Default Constructor.
  48      */      
  49      public VMException() {
  50         
  51         super("Unknown VMException");
  52         numeric = UNKNOWN;        
  53      }
  54 
  55 
  56     /**
  57      *  Numeric only constructor.  This will not set a text message.
  58      */      
  59      public VMException(int  num) {
  60           
  61           super();
  62           numeric = num;
  63      }
  64      
  65     /**
  66      *  Numeric and message constructor
  67      */      
  68      public VMException(int num, String message) {
  69           
  70           super(message);
  71           numeric = num;         
  72      }     
  73 
  74 	// --- PRIVATE METHODS ---------------------------------------------------	
  75 
  76 }