diff options
author | Florian Weikert <fwe@google.com> | 2015-08-18 14:37:46 +0000 |
---|---|---|
committer | Lukacs Berki <lberki@google.com> | 2015-08-20 14:43:54 +0000 |
commit | 3f610e837d08eaa72d5ead62a7215365e14a24cb (patch) | |
tree | d7dc43e62a5e916101045ab376e82ba21bc163ec /src/main/java/com/google/devtools/build/lib/events | |
parent | b537f8250ae1d3d39336c9cf90fc1bba831c6a0f (diff) |
Skylark error messages now include a stack trace.
This means that some tests had to be changed from using exact equality of error messages to working with contains() / startsWith().
--
MOS_MIGRATED_REVID=100923593
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/events')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/events/Location.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/events/Location.java b/src/main/java/com/google/devtools/build/lib/events/Location.java index 58301b7ea2..608d307c68 100644 --- a/src/main/java/com/google/devtools/build/lib/events/Location.java +++ b/src/main/java/com/google/devtools/build/lib/events/Location.java @@ -275,4 +275,20 @@ public abstract class Location implements Serializable { return line * 41 + column; } } + + /** + * Dummy location for built-in functions which ensures that stack traces contain "nice" location + * strings. + */ + public static final Location BUILTIN = new Location(0, 0) { + @Override + public String toString() { + return "Built-In"; + } + + @Override + public PathFragment getPath() { + return null; + } + }; } |