[kudu-CR] KUDU-1911 add more helpful error message when required tool arguments are missing
Sam Okrent has uploaded a new change for review. http://gerrit.cloudera.org:8080/6986 Change subject: KUDU-1911 add more helpful error message when required tool arguments are missing .. KUDU-1911 add more helpful error message when required tool arguments are missing When using a tool that has a required positional argument, excluding that argument or passing it as a flag caused a confusing error message to be printed out ("must provide missing_argument"). This commit changes the message to "must provide positional argument missing_argument". Change-Id: I2128a01da5c4929981b2ea46a32b0f7b9dd066e1 --- M src/kudu/tools/kudu-tool-test.cc M src/kudu/tools/tool_main.cc 2 files changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/86/6986/1 -- To view, visit http://gerrit.cloudera.org:8080/6986 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2128a01da5c4929981b2ea46a32b0f7b9dd066e1 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Sam Okrent
[kudu-CR] KUDU-1911 add more helpful error message when required tool arguments are missing
Andrew Wong has posted comments on this change. Change subject: KUDU-1911 add more helpful error message when required tool arguments are missing .. Patch Set 1: (3 comments) left a couple formatting comments http://gerrit.cloudera.org:8080/#/c/6986/1//COMMIT_MSG Commit Message: Line 7: KUDU-1911 add more helpful error message when required tool arguments are missing nit: from https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines: "As a general rule, your messages should start with a single line that’s no more than about 50 characters and that describes the changeset concisely, followed by a blank line, followed by a more detailed explanation." http://gerrit.cloudera.org:8080/#/c/6986/1/src/kudu/tools/kudu-tool-test.cc File src/kudu/tools/kudu-tool-test.cc: Line 508: TEST_F(ToolTest, TestActionRequiredArgument) { maybe TestActionMissingRequiredArg? Line 510: NO_FATALS(RunActionRequiredArgument("cluster ksck --master_addresses=master.example.com", "master_addresses")); nit: keep the line length under 100 characters See this part of the style guide for spacing tips: https://google.github.io/styleguide/cppguide.html#Formatting -- To view, visit http://gerrit.cloudera.org:8080/6986 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2128a01da5c4929981b2ea46a32b0f7b9dd066e1 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Sam Okrent Gerrit-Reviewer: Andrew Wong Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: Kudu Jenkins Gerrit-HasComments: Yes
[kudu-CR] KUDU-1911 add more helpful error message when required tool arguments are missing
Dan Burkert has posted comments on this change. Change subject: KUDU-1911 add more helpful error message when required tool arguments are missing .. Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/6986/1/src/kudu/tools/tool_main.cc File src/kudu/tools/tool_main.cc: Line 95: return Status::InvalidArgument(Substitute("must provide $0", a.name)); Consider adding 'flag argument' to this, in order to further differentiate. -- To view, visit http://gerrit.cloudera.org:8080/6986 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2128a01da5c4929981b2ea46a32b0f7b9dd066e1 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Sam Okrent Gerrit-Reviewer: Andrew Wong Gerrit-Reviewer: Dan Burkert Gerrit-Reviewer: Kudu Jenkins Gerrit-HasComments: Yes