Discriminate error message on having just wrong number of arguments#62
Discriminate error message on having just wrong number of arguments#62rezaebrh wants to merge 3 commits intodaniele77:masterfrom
Conversation
|
Thank you @rezaebrh . You're right: the system should definitely discriminate against the two cases and print different error messages. |
Use provided output streamer instead of ``std::cout``
Fix error
|
Yeah sorry for my carelessness. The output streamer fixed. Although in this PR I haven't done something in order to provide customizable error messages, but I'm looking forward to fix it too. |
|
Thank you for your fix, @rezaebrh ! I'm planning to check your PR on Monday. |
|
Hi guys! If the current code is merged, whenever someone types This is because of this following code in the same file: |
|
@sakshamsharma you're right. A few ideas are coming to my mind since if I haven't changed the return value to |
|
Well, actually having an error message specific is a task almost impossible, because you can have the same command name with different parameter (different parameter number and different parameter types). At the code level, Probably more trouble than it's worth. So, for the moment, I simply changed the single error message from "Unknown command" to "Wrong command" :-) |
Hi
In case you use a command with wrong number of arguments, the error message will be the same as having an unexciting command entered.