From a05aae3df52621eb03f2b3910b899f52e28884f9 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Tue, 12 Oct 2010 09:22:18 +0200 Subject: [PATCH] Abort on unknown/misspelled configuration options --- src/config.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 87affb5..84f672b 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -459,7 +459,7 @@ int Config::load_service_config_file(const string& full_filename) try { po::variables_map vm; - po::parsed_options parsed_service_options = po::parse_config_file(service_config_file,*this->OptDescConfService,true); + po::parsed_options parsed_service_options = po::parse_config_file(service_config_file,*this->OptDescConfService,false); po::store(parsed_service_options,vm); po::notify(vm); @@ -552,7 +552,7 @@ int Config::load_main_config_file(const string& full_filename) { try { - po::parsed_options parsed_main_options = po::parse_config_file(main_config_file,*this->OptDescConfMain,true); + po::parsed_options parsed_main_options = po::parse_config_file(main_config_file,*this->OptDescConfMain,false); po::store(parsed_main_options,VariablesMap); po::notify(VariablesMap); @@ -611,7 +611,7 @@ int Config::load_main_config_file(const string& full_filename) if ( VariablesMap.count("dialup_sleep_seconds") ) DialupSleepSeconds = VariablesMap["dialup_sleep_seconds"].as(); } - catch( const po::unknown_option& e ) // at the moment 04-08-2009 this exception is never thrown :-( + catch( const po::unknown_option& e ) { // unknown option in main config file detected main_config_file.close(); -- 1.7.1