aboutsummaryrefslogtreecommitdiffstats
path: root/src/ConfigParser.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-28 17:13:52 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-28 17:13:52 +0100
commitc3dbbec39aef32789aacb872c88801f0c5d15ef7 (patch)
treef935c3ae09246c4dbb714d1fd73a2f874925802f /src/ConfigParser.cpp
parentaec2a980fc37bd5d28f06c8e48a98b51ae65ac32 (diff)
downloaddabmod-c3dbbec39aef32789aacb872c88801f0c5d15ef7.tar.gz
dabmod-c3dbbec39aef32789aacb872c88801f0c5d15ef7.tar.bz2
dabmod-c3dbbec39aef32789aacb872c88801f0c5d15ef7.zip
Catch all exceptions as const
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r--src/ConfigParser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 69655b4..21f2c23 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -85,7 +85,7 @@ static void parse_configfile(
auto telnetrc = make_shared<RemoteControllerTelnet>(telnetport);
rcs.add_controller(telnetrc);
}
- catch (std::exception &e) {
+ catch (const std::exception &e) {
std::cerr << "Error: " << e.what() << "\n";
std::cerr << " telnet remote control enabled, but no telnetport defined.\n";
throw std::runtime_error("Configuration error");
@@ -98,7 +98,7 @@ static void parse_configfile(
auto zmqrc = make_shared<RemoteControllerZmq>(zmqCtrlEndpoint);
rcs.add_controller(zmqrc);
}
- catch (std::exception &e) {
+ catch (const std::exception &e) {
std::cerr << "Error: " << e.what() << "\n";
std::cerr << " zmq remote control enabled, but no endpoint defined.\n";
throw std::runtime_error("Configuration error");
@@ -129,7 +129,7 @@ static void parse_configfile(
try {
logfilename = pt.Get("log.filename", "");
}
- catch (std::exception &e) {
+ catch (const std::exception &e) {
std::cerr << "Error: " << e.what() << "\n";
std::cerr << " Configuration enables file log, but does not specify log filename\n";
throw std::runtime_error("Configuration error");
@@ -335,7 +335,7 @@ static void parse_configfile(
try {
mod_settings.tist_offset_s = pt.GetReal("delaymanagement.offset", 0.0);
}
- catch (std::exception &e) {
+ catch (const std::exception &e) {
std::cerr << "Error: delaymanagement: synchronous is enabled, but no offset defined!\n";
throw std::runtime_error("Configuration error");
}