Psi2ir: improve exception stack traces
- Do not wrap exceptions resulting from generating error expressions multiple times, as that could lead to stack traces where the identical code is wrapped many times and is printed in the exception message on each step, which was difficult to read - Add element location (file name, line number & position) to the message, similarly to exceptions from codegen, when catching and rethrowing exceptions at the top level
This commit is contained in:
@@ -75,7 +75,7 @@ public class PackageCodegenImpl implements PackageCodegen {
|
||||
}
|
||||
catch (Throwable e) {
|
||||
VirtualFile vFile = file.getVirtualFile();
|
||||
CodegenUtil.reportBackendException(e, "file facade code generation", vFile == null ? null : vFile.getUrl());
|
||||
CodegenUtil.reportBackendException(e, "file facade code generation", vFile == null ? null : vFile.getUrl(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user