return VF.sourceLocation(uri, offset, length, beginLine, endLine, beginCol, endCol);
}
private static StackTrace buildTrace(Throwable targetException, StackTrace rascalTrace) throws IOException {
StackTraceElement[] stackTrace = targetException.getStackTrace();
StackTrace newTrace = new StackTrace();
for (StackTraceElement elem : stackTrace) {
if (elem.getMethodName().equals("invoke")) {
break;
}
newTrace.add(robustSourceLocation(elem.getFileName(), 0, 0, elem.getLineNumber(), elem.getLineNumber(), 0, 0), elem.getClassName() + "." + elem.getMethodName());
}
newTrace.addAll(rascalTrace);
return newTrace.freeze();
}