Opened 8 years ago

Last modified 8 years ago

#11058 new Bugs

(parsing) Some thrown exceptions's messages are missing important info about the offending options

Reported by: Denis N <dzinyss@…> Owned by: Vladimir Prus
Milestone: To Be Determined Component: program_options
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

The "unknown_option" exception has a message that looks like "unrecognized option".

This can be easily improved by modifying the line cmdline.cpp:427

to: boost::throw_exception(unknown_option(opt.string_key));

Similar issue with " multiple occurences" exception. The exception message does not specify which of the options occured multiple times. This can be fixed by adding the constructor parameter in "multiple_occurences" exception class, and passing it to the parent class.

Change History (1)

comment:1 by viboes, 8 years ago

Component: Noneprogram_options
Owner: set to Vladimir Prus
Note: See TracTickets for help on using tickets.