1 20 21 package JFlex; 22 23 import java.io.File ; 24 25 32 public class ScannerException extends RuntimeException { 33 34 public int line; 35 public int column; 36 public ErrorMessages message; 37 public File file; 38 39 private ScannerException(File file, String text, ErrorMessages message, int line, int column) { 40 super(text); 41 this.file = file; 42 this.message = message; 43 this.line = line; 44 this.column = column; 45 } 46 47 48 53 public ScannerException(ErrorMessages message) { 54 this( null, ErrorMessages.get(message), message, -1, -1 ); 55 } 56 57 63 public ScannerException(File file, ErrorMessages message) { 64 this( file, ErrorMessages.get(message), message, -1, -1 ); 65 } 66 67 68 75 public ScannerException(ErrorMessages message, int line) { 76 this( null, ErrorMessages.get(message), message, line, -1 ); 77 } 78 79 80 87 public ScannerException(File file, ErrorMessages message, int line) { 88 this( file, ErrorMessages.get(message), message, line, -1 ); 89 } 90 91 92 100 public ScannerException(File file, ErrorMessages message, int line, int column) { 101 this( file, ErrorMessages.get(message), message, line, column ); 102 } 103 104 } 105 | Popular Tags |