jcommander: Need way to automatically show usage if required params are missing
Currently if you specify help = true in a parameter, exceptions are suppressed. However, you then have to manually check for required parameters not being set.
It would be great if there were a way to prevent exceptions from being thrown on missing required parameters, but print the usage text instead. Maybe in addition to adding help = true to a help parameter, you could also specify usage = true, and if a parameter is missing, even if the help option was not given on the commandline, JCommander could set the help parameter value to true, so that the usage text is displayed?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
How about adding the JCommander instance to the ParameterException?
– Cédric
On Fri, Mar 17, 2017 at 10:35 PM, Luke Hutchison notifications@github.com wrote: