diff options
author | 2017-06-28 11:18:40 +0200 | |
---|---|---|
committer | 2017-06-28 15:25:38 +0200 | |
commit | 0a0d7a48095a893efe41a6e54deb57f47d750594 (patch) | |
tree | 977c578abcfaa41a29e44eddd09f816768a3a99a /src/main/java/com/google/devtools/build/lib | |
parent | fe037f36edcf2a57a3db601b8f71771260336c1b (diff) |
BugReport: include ERROR on internal error messages
While a sentence like "bazel ran out of memory and crashed" should be
human-readable enough, it seems that users often only scan for the word
ERROR in the output and assume everything is fine, if it doesn't occur.
Things get worse, if that procedure is scripted. While these kind of behaviors
should be discouraged, mitigate the consequences by providing mainstream error
messages.
Change-Id: I5a032360881c53575bfbd37a471b96933622d3c5
PiperOrigin-RevId: 160385223
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BugReport.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BugReport.java b/src/main/java/com/google/devtools/build/lib/runtime/BugReport.java index d07a444fa5..0ff74cd9ed 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BugReport.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BugReport.java @@ -77,7 +77,7 @@ public abstract class BugReport { LOG.severe("Crash: " + Throwables.getStackTraceAsString(throwable)); BugReport.sendBugReport(throwable, Arrays.asList(args)); BugReport.printBug(OutErr.SYSTEM_OUT_ERR, throwable); - System.err.println(getProductName() + " crash in async thread:"); + System.err.println("ERROR: " + getProductName() + " crash in async thread:"); throwable.printStackTrace(); } @@ -114,7 +114,7 @@ public abstract class BugReport { } } catch (Throwable t) { System.err.println( - "An crash occurred while " + "ERROR: An crash occurred while " + getProductName() + " was trying to handle a crash! Please file a bug against " + getProductName() @@ -153,7 +153,7 @@ public abstract class BugReport { public static void printBug(OutErr outErr, Throwable e) { if (e instanceof OutOfMemoryError) { outErr.printErr( - e.getMessage() + "\n\n" + getProductName() + " ran out of memory and crashed.\n"); + e.getMessage() + "\n\nERROR: " + getProductName() + " ran out of memory and crashed.\n"); } else { printThrowableTo(outErr, e); } |