Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use debugPrint instead of str for fail arguments #18818

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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