diff options
author | Laurent Le Brun <laurentlb@google.com> | 2015-05-20 13:28:44 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2015-05-21 09:49:22 +0000 |
commit | 427bd972aa824a00202efe65752d0da9f0bfe0d5 (patch) | |
tree | 9c7f1458304693be73fb19fb06a9edad0ac7d6c6 /src/main/java/com/google/devtools/build/lib/syntax/EvalException.java | |
parent | 5a639a98c2d1162952f6baea2688137ae73befe8 (diff) |
Clean up exception handling in DotExpression and FuncallExpression.
Factor the exception handling where possible.
Also, don't print the exception name in error messages.
--
MOS_MIGRATED_REVID=94083727
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax/EvalException.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/syntax/EvalException.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/EvalException.java b/src/main/java/com/google/devtools/build/lib/syntax/EvalException.java index 8a8ff9e3ef..ae9c04dd09 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/EvalException.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/EvalException.java @@ -89,8 +89,7 @@ public class EvalException extends Exception { * Returns the error message with location info if exists. */ public String print() { // TODO(bazel-team): do we also need a toString() method? - return this.getClass().getName() - + (getLocation() == null ? "" : " at " + getLocation()) + ": " + return (getLocation() == null ? "" : getLocation()) + ": " + (message == null ? "" : message + "\n") + (dueToIncompleteAST ? "due to incomplete AST\n" : "") + (getCause() != null && getCause().getMessage() != null ? getCause().getMessage() : ""); |