01: package com.teamkonzept.lib.math;
02:
03: public class UnsupportedOperatorException extends Exception {
04:
05: final static int SYNTAX_ERROR = 0;
06: final static int MISSING_OPENING_PAREN = 1;
07: final static int MISSING_CLOSING_PAREN = 2;
08: final static int UNKNOWN_RESULT = 3;
09:
10: int optype;
11: int position;
12: Class caller;
13:
14: public UnsupportedOperatorException(Class caller, int optype,
15: int position) {
16: this .optype = optype;
17: this .position = position;
18: this .caller = caller;
19: }
20:
21: public String toString() {
22: return "the operator with type " + optype
23: + " is not supported in " + caller;
24: }
25: }
|