KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java_cup > internal_error


1
2 package java_cup;
3
4 /** Exception subclass for reporting internal errors in JavaCup. */
5 public class internal_error extends Exception JavaDoc
6   {
7     /** Constructor with a message */
8     public internal_error(String JavaDoc msg)
9       {
10     super(msg);
11       }
12
13     /** Method called to do a forced error exit on an internal error
14     for cases when we can't actually throw the exception. */

15     public void crash()
16       {
17           ErrorManager.getManager().emit_fatal("JavaCUP Internal Error Detected: "+getMessage());
18           printStackTrace();
19           System.exit(-1);
20       }
21   }
22
Popular Tags