File: internal_error.java

package info (click to toggle)
cup 0.10g-2
  • links: PTS
  • area: contrib
  • in suites: potato, slink
  • size: 620 kB
  • ctags: 716
  • sloc: java: 5,338; makefile: 120; csh: 64; sh: 5
file content (22 lines) | stat: -rw-r--r-- 551 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

package java_cup;

/** Exception subclass for reporting internal errors in JavaCup. */
public class internal_error extends Exception
  {
    /** Constructor with a message */
    public internal_error(String msg)
      {
	super(msg);
      }

    /** Method called to do a forced error exit on an internal error
	for cases when we can't actually throw the exception.  */
    public void crash()
      {
	System.err.println("JavaCUP Fatal Internal Error Detected");
	System.err.println(getMessage());
	printStackTrace();
	System.exit(-1);
      }
  }