1 package com.teamkonzept.lib.math; 2 3 4 public class UnsupportedOperatorException extends Exception { 5 6 final static int SYNTAX_ERROR = 0; 7 final static int MISSING_OPENING_PAREN = 1; 8 final static int MISSING_CLOSING_PAREN = 2; 9 final static int UNKNOWN_RESULT = 3; 10 11 int optype; 12 int position; 13 Class caller; 14 15 public UnsupportedOperatorException(Class caller, 16 int optype, int position){ 17 this.optype = optype; 18 this.position = position; 19 this.caller = caller; 20 } 21 22 public String toString(){ 23 return "the operator with type " + optype 24 + " is not supported in " + caller; 25 } 26 } 27 | Popular Tags |