Opened 12 years ago

#5454 new Bugs

different behavior to report one kind of errors

Reported by: anberlin.myplace@… Owned by: Vladimir Prus
Milestone: To Be Determined Component: program_options
Version: Boost 1.45.0 Severity: Problem
Keywords: program options exception Cc:

Description

If 'configuration file' has option wich not presented in 'options_description', then 'parse_config_file' throws 'logic_error'.

If 'options_description' has option wich not presented in 'configuration file', then 'variablesMap[ "option" ].as<...>()' throws 'bad_cast'.

It's will be good to have one type of error reporting: exception from 'parse_config_file'.

Attachments (3)

config_file_test.cpp (1.6 KB ) - added by anonymous 12 years ago.
config_file_1 (15 bytes ) - added by anonymous 12 years ago.
config_file_2 (32 bytes ) - added by anonymous 12 years ago.

Download all attachments as: .zip

Change History (3)

by anonymous, 12 years ago

Attachment: config_file_test.cpp added

by anonymous, 12 years ago

Attachment: config_file_1 added

by anonymous, 12 years ago

Attachment: config_file_2 added
Note: See TracTickets for help on using tickets.