Don't render stack trace in a warning
These stack traces are confusing: they make it seem as if an exception was thrown
This commit is contained in:
+4
-4
@@ -90,7 +90,7 @@ public class VirtualFileKotlinClass implements KotlinJvmBinaryClass {
|
|||||||
return new VirtualFileKotlinClass(file, nameAndHeader.first, nameAndHeader.second);
|
return new VirtualFileKotlinClass(file, nameAndHeader.first, nameAndHeader.second);
|
||||||
}
|
}
|
||||||
catch (Throwable e) {
|
catch (Throwable e) {
|
||||||
LOG.warn(renderFileReadingErrorMessage(file), e);
|
LOG.warn(renderFileReadingErrorMessage(file));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -232,9 +232,9 @@ public class VirtualFileKotlinClass implements KotlinJvmBinaryClass {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static String renderFileReadingErrorMessage(@NotNull VirtualFile file) {
|
private static String renderFileReadingErrorMessage(@NotNull VirtualFile file) {
|
||||||
return "Could not read file: " + file.getPath() + "\n"
|
return "Could not read file: " + file.getPath() + "; "
|
||||||
+ "Size in bytes: " + file.getLength() + "\n"
|
+ "size in bytes: " + file.getLength() + "; "
|
||||||
+ "File type: " + file.getFileType().getName();
|
+ "file type: " + file.getFileType().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user