aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2016-12-29 21:41:33 +0000
committerGravatar John Cater <jcater@google.com>2017-01-03 15:02:44 +0000
commitc31f351a191d6927a6483384826297e5549cf426 (patch)
tree1b65b2caf884254917d6c0059f88f3e1dfce9d44 /src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
parentccb78ec8a0ba777ad9f121de95e553791fa9c617 (diff)
Cleanup in error messages, try to improve consistency.
-- PiperOrigin-RevId: 143204724 MOS_MIGRATED_REVID=143204724
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java b/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
index b4e2a21301..415d4273ca 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
@@ -1001,7 +1001,7 @@ public class MethodLibrary {
try {
return maxOrdering.max(getIterable(args, loc));
} catch (NoSuchElementException ex) {
- throw new EvalException(loc, "Expected at least one argument");
+ throw new EvalException(loc, "expected at least one argument");
}
}
@@ -1207,7 +1207,7 @@ public class MethodLibrary {
}
i++;
}
- throw new EvalException(loc, Printer.format("Item %r not found in list", x));
+ throw new EvalException(loc, Printer.format("item %r not found in list", x));
}
};
@@ -1235,7 +1235,7 @@ public class MethodLibrary {
return Runtime.NONE;
}
}
- throw new EvalException(loc, Printer.format("Item %r not found in list", x));
+ throw new EvalException(loc, Printer.format("item %r not found in list", x));
}
};
@@ -1749,15 +1749,13 @@ public class MethodLibrary {
throw new EvalException(
location,
String.format(
- "Sequence #%d has length %d, but exactly two elements are required",
+ "item #%d has length %d, but exactly two elements are required",
pos, numElements));
}
return tuple;
} catch (ConversionException e) {
throw new EvalException(
- loc,
- String.format(
- "Cannot convert dictionary update sequence element #%d to a sequence", pos));
+ loc, String.format("cannot convert item #%d to a sequence", pos));
}
}
};
@@ -1945,7 +1943,7 @@ public class MethodLibrary {
throw new EvalException(
loc,
Printer.format(
- "Object of type '%s' has no attribute %r%s",
+ "object of type '%s' has no attribute %r%s",
EvalUtils.getDataTypeName(obj),
name,
isRealMethod ? ", however, a method of that name exists" : ""));