KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > java_cup > internal > internal_error


1
2 package com.sun.java_cup.internal;
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     System.err.println("JavaCUP Fatal Internal Error Detected");
18     System.err.println(getMessage());
19     printStackTrace();
20     System.exit(-1);
21       }
22   }
23
Popular Tags