CLI11 icon indicating copy to clipboard operation
CLI11 copied to clipboard

The reason for exception OptionAlreadyAdded could be clarified

Open tobgu opened this issue 6 years ago • 2 comments

If I add an option with short_name="o", name="option", and then another option with short_name="o" and name="another-option" an OptionAlreadyAdded will be thrown since the short name "o" is already in use.

The error message will state that: "another-option is already added", however.

It would be nice if the message could also include the reason for the collision (eg. that the short name is already used).

tobgu avatar May 21 '19 13:05 tobgu

I just spent an hour figuring out that i can't add an option with short_name="-h" because it is already used by the default help option. OptionAlreadyAdded was a total red herring.

jiggersplat avatar Aug 13 '20 18:08 jiggersplat