Finished fine tuning due to linter output.
[bpdyndnsd] / src / config.cpp
index 89fcbfc..24f720b 100644 (file)
@@ -302,19 +302,19 @@ int Config::parse_cmd_line(int argc, char *argv[])
             ExternalWarningLevel = VariablesMap["external_warning_level"].as<int>();
 
     }
-    catch( po::unknown_option& e )
+    catch( const po::unknown_option& e )
     {
         Log->print_unknown_cmd_option(e.what());
         Log->print_usage(OptDescCmd);
         return -1;
     }
-    catch( po::multiple_occurrences& e )
+    catch( const po::multiple_occurrences& e )
     {
         Log->print_multiple_cmd_option(e.what());
         Log->print_usage(OptDescCmd);
         return -1;
     }
-    catch( po::error& e )
+    catch( const po::error& e )
     {
         Log->print_error_parsing_cmd(e.what());
         Log->print_usage(OptDescCmd);
@@ -464,20 +464,20 @@ int Config::load_service_config_file(const string& full_filename)
                 return -1;
             }
         }
-        catch ( po::unknown_option& e )
+        catch( const po::unknown_option& e )
         {
             // unknown option in config file detected
             service_config_file.close();
             Log->print_unknown_service_conf_option(full_filename,e.what());
             return -1;
         }
-        catch( po::multiple_occurrences& e )
+        catch( const po::multiple_occurrences& e )
         {
             service_config_file.close();
             Log->print_multiple_service_conf_option(full_filename,e.what());
             return -1;
         }
-        catch( po::error& e )
+        catch( const po::error& e )
         {
             service_config_file.close();
             Log->print_error_parsing_config_file(full_filename,e.what());
@@ -553,14 +553,14 @@ int Config::load_main_config_file(const string& full_filename)
                 ExternalWarningLevel = VariablesMap["external_warning_level"].as<int>();
 
         }
-        catch ( po::unknown_option& e )      // at the moment 04-08-2009 this exception is never thrown :-(
+        catch( const po::unknown_option& e )      // at the moment 04-08-2009 this exception is never thrown :-(
         {
             // unknown option in main config file detected
             main_config_file.close();
             Log->print_unknown_main_conf_option(e.what());
             return -1;
         }
-        catch(po::multiple_occurrences& e)
+        catch( const po::multiple_occurrences& e )
         {
             main_config_file.close();
             Log->print_multiple_main_conf_option(full_filename,e.what());