1 22 package org.jboss.ejb.plugins.cmp.ejbql; 23 24 30 public final class UnknownPathException extends RuntimeException { 31 private final String reason; 32 private final String path; 33 private final String fieldName; 34 private final int errorLine; 35 private final int errorColumn; 36 37 public UnknownPathException( 38 String reason, 39 String path, 40 String fieldName, 41 int errorLine, 42 int errorColumn) { 43 44 super(reason + ": at line " + errorLine + ", "+ 45 "column " + errorColumn + ". " + 46 "Encountered: \"" + fieldName + "\"" + 47 ((path==null) ? "" : " after: \"" + path + "\"") ); 48 49 this.reason = reason; 50 this.path = path; 51 this.fieldName = fieldName; 52 this.errorLine = errorLine; 53 this.errorColumn = errorColumn; 54 } 55 public String getReason() { 56 return reason; 57 } 58 public String getCurrentPath() { 59 return path; 60 } 61 public String getFieldName() { 62 return fieldName; 63 } 64 public int getErrorLine() { 65 return errorLine; 66 } 67 public int getErrorColumn() { 68 return errorColumn; 69 } 70 } 71 | Popular Tags |