Abort on unknown/misspelled configuration options
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 12 Oct 2010 07:22:18 +0000 (09:22 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 12 Oct 2010 07:22:18 +0000 (09:22 +0200)
src/config.cpp

index 87affb5..84f672b 100644 (file)
@@ -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<int>();
         }
-        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();