cbeust / jcommander

Command line parsing framework for Java
Apache License 2.0
1.94k stars 332 forks source link

Keep original exception thrown by the parameter setter method #572

Closed sdruzkin closed 8 months ago

sdruzkin commented 9 months ago

This change adds the exception thrown by a setter method annotated with the @Parameter to the ParameterException.

Before this change it was not clear what exactly happened, because ParameterException did not have the original exception thrown by the @Parameter setter method.

mkarg commented 8 months ago

Thank you for this contribution! :+1:

mkarg commented 8 months ago

I simplified your test a bit, so now it does the same but is one line shorter. 😃