1 28 29 package com.caucho.es; 30 31 34 public class ESParseException extends ESException { 35 private String file; 36 private int beginLine; 37 private int beginCh; 38 private int endLine; 39 private int endCh; 40 41 public ESParseException(String file, int beginLine, int beginCh, 42 int endLine, int endCh, String msg) 43 { 44 super(msg); 45 46 this.file = file; 47 this.beginLine = beginLine; 48 this.beginCh = beginCh; 49 this.endLine = endLine; 50 this.endCh = endCh; 51 } 52 53 public ESParseException(Exception e) 54 { 55 super(e); 56 } 57 58 public String getMessage() 59 { 60 return file + ":" + endLine + ": " + super.getMessage(); 61 } 62 63 public String getText() 64 { 65 return super.getMessage(); 66 } 67 68 public String getFilename() 69 { 70 return file; 71 } 72 73 public int getLine() 74 { 75 return endLine; 76 } 77 78 public int getColumn() 79 { 80 return 0; 81 } 82 } 83 84 85 86 | Popular Tags |