1 package edu.uci.eecs.specExtraction;
7 * This class is the main error processing exception in processing the
14 public class WrongAnnotationException extends Exception {
18 private static final long serialVersionUID = 1L;
20 public WrongAnnotationException(String msg) {
26 * This is a utility function for more conveniently generating specification
27 * error exceptions. We help locate the error by the line number in the
28 * processing file, and an associated error message.
32 * The file that we see the error
34 * The associated line number of the error
36 * The error message printout
37 * @throws WrongAnnotationException
39 public static void err(File file, int line, String msg)
40 throws WrongAnnotationException {
41 String errMsg = "Spec error in file \"" + file.getName() + "\", Line "
42 + line + " :\n\t" + msg + "\n";
43 throw new WrongAnnotationException(errMsg);
48 * This is a utility function for more conveniently generating specification
49 * warning. We help locate the warning by the line number in the processing
50 * file, and an associated warning message.
54 * The file that we see the warning
56 * The associated line number of the warning
58 * The warning message printout
59 * @throws WrongAnnotationException
61 public static void warning(File file, int line, String msg) {
62 String errMsg = "Spec WARNING in file \"" + file.getName()
63 + "\", Line " + line + " :\n\t" + msg + "\n";
64 System.out.println(errMsg);