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:
Alexander Udalov
2014-04-30 19:05:22 +04:00
parent 42d167d17e
commit 981b6fdaff
@@ -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