cbeust / jcommander

Command line parsing framework for Java
Apache License 2.0
1.97k stars 334 forks source link

Keep original exception thrown by the parameter setter method #572

Closed sdruzkin closed 11 months ago

sdruzkin commented 1 year 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 11 months ago

Thank you for this contribution! :+1:

mkarg commented 11 months ago

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