01: package java_cup;
02:
03: /** Exception subclass for reporting internal errors in JavaCup. */
04: public class internal_error extends Exception {
05: /** Constructor with a message */
06: public internal_error(String msg) {
07: super (msg);
08: }
09:
10: /** Method called to do a forced error exit on an internal error
11: for cases when we can't actually throw the exception. */
12: public void crash() {
13: ErrorManager.getManager().emit_fatal(
14: "JavaCUP Internal Error Detected: " + getMessage());
15: printStackTrace();
16: System.exit(-1);
17: }
18: }
|