Skip to content

Commit

Permalink
update error print to say how many arguments are expected
Browse files Browse the repository at this point in the history
Summary:
Current error message is unhelpful :(
add some context to how many arguments were expected

Reviewed By: chadaustin

Differential Revision: D64968870

fbshipit-source-id: d5bea38c5c5f0cbf87441da53db19f7e26fd9285
  • Loading branch information
Martin Li authored and facebook-github-bot committed Oct 25, 2024
1 parent 3828478 commit 34d9ccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion watchman/cmds/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using namespace watchman;
/* query /root {query} */
static UntypedResponse cmd_query(Client* client, const json_ref& args) {
if (json_array_size(args) != 3) {
throw ErrorResponse("wrong number of arguments for 'query'");
throw ErrorResponse("wrong number of arguments for 'query', expected 3");
}

auto root = resolveRoot(client, args);
Expand Down

0 comments on commit 34d9ccf

Please sign in to comment.