Skip to content

Commit

Permalink
Use debugPrint instead of str for fail arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Jun 29, 2023
1 parent dac1780 commit ec25acf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/starlark/java/eval/MethodLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@ public void fail(Object msg, Object attr, Tuple args, StarlarkThread thread)
List<String> elems = new ArrayList<>();
// msg acts like a leading element of args.
if (msg != Starlark.NONE) {
elems.add(Starlark.str(msg, thread.getSemantics()));
elems.add(new Printer().debugPrint(msg, thread.getSemantics()).toString());
}
for (Object arg : args) {
elems.add(Starlark.str(arg, thread.getSemantics()));
elems.add(new Printer().debugPrint(arg, thread.getSemantics()).toString());
}
String str = Joiner.on(" ").join(elems);
if (attr != Starlark.NONE) {
Expand Down

0 comments on commit ec25acf

Please sign in to comment.