this.location = Locations.NO_LOCATION;
}
+ public InternalCompilerError(String message, Throwable cause) {
+ super(message, cause);
+ this.location = Locations.NO_LOCATION;
+ }
+
public InternalCompilerError(long location, String message) {
super(message);
this.location = location;
super(cause);
this.location = location;
}
+
+ public static InternalCompilerError injectLocation(long location, Throwable cause) {
+ if(cause instanceof InternalCompilerError) {
+ InternalCompilerError e = (InternalCompilerError)cause;
+ if(e.location == Locations.NO_LOCATION)
+ e.location = location;
+ return e;
+ }
+ else
+ return new InternalCompilerError(location, cause);
+ }
}