-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Discriminate error message on having just wrong number of arguments #62
base: master
Are you sure you want to change the base?
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.