-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
imp(errors): Provide the missing required arguments as info #2016
Conversation
Why do you need them? |
Other error kinds provide info of wrong arguments, conflicts etc. I want to use clap as command parser for a discord bot and I'll eventually generate the help & error messages |
I asked because I want to remove the field entirely because I find it useless. For example, if you want to render the message, you can just |
It's not useless. We are providing some programmable information in that field as @nickelc said. |
@CreepySkeleton I gave the reasons in #1976. Let's go ahead and merge this one. |
hey @nickelc , could you please explain why exactly you need the names of the args? Why doesn't |
The error messages he wants to write is probably not the ones we are generating. And since |
I want to parse discord messages with clap but generate the help & error messages be myself as discord messages. Maybe some kind of help & error renderer trait could help here to make clap more customizable. |
I'm now convinced this can be useful, albeit seldom.
If you have a solid idea, open a separate issue. bors r+ |
Build succeeded: |
Collect the missing required arguments for
Error::info
.Code
cargo r
Output