1 46 package groovy.lang; 47 48 49 58 public class MissingFieldException extends GroovyRuntimeException { 59 60 private String field; 61 private Class type; 62 63 public MissingFieldException(String field, Class type) { 64 super("No such field: " + field + " for class: " + type.getName()); 65 this.field = field; 66 this.type = type; 67 } 68 69 public MissingFieldException(String field, Class type, Throwable e) { 70 super("No such field: " + field + " for class: " + type.getName() + ". Reason: " + e, e); 71 this.field = field; 72 this.type = type; 73 } 74 75 public MissingFieldException(String message, String field, Class type) { 76 super(message); 77 this.field = field; 78 this.type = type; 79 } 80 81 84 public String getField() { 85 return field; 86 } 87 88 92 public Class getType() { 93 return type; 94 } 95 } 96 | Popular Tags |