Replies: 1 comment 2 replies
-
The reason we skip usage in value parser errors is it seems like its unlikely to provide useful context to solve the problem. As for custom errors, we don't know what is being done and whether a usage is useful context or not. So the question is how we can make Constraints
Potential paths forward, requiring a breaking change
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed in https://docs.rs/clap/latest/clap/_derive/_tutorial/chapter_3/index.html that errors raised through a custom value parser do not show a usage section whereas errors raised with a custom validator do show a usage section.
Is there any way to enable showing the usage section for errors raised by custom parsers or disable showing the usage section for errors raised by custom validators? My intention here is to make the UX consistent across error messages and I sometimes need to use custom validators and sometimes use value parsers to throw errors.
Beta Was this translation helpful? Give feedback.
All reactions