[cli] return OT_ERROR_INVALID_ARGS for invalid arguments (#4639)

- Remove argument parsing failure from semantic of OT_ERROR_PARSE.

- Add OT_ERROR_INVALID_COMMAND to indicate invalid CLI command error.

- return OT_ERROR_INVALID_ARGS for invalid CLI arguments.
This commit is contained in:
kangping
2020-03-19 10:51:42 -07:00
committed by GitHub
parent db765d9370
commit 133ec09b80
14 changed files with 92 additions and 91 deletions
+1 -1
View File
@@ -260,7 +260,7 @@ exit:
otError UdpExample::Process(int argc, char *argv[])
{
otError error = OT_ERROR_PARSE;
otError error = OT_ERROR_INVALID_COMMAND;
if (argc < 1)
{