summaryrefslogtreecommitdiffstats
path: root/src/dabOutput
diff options
context:
space:
mode:
Diffstat (limited to 'src/dabOutput')
-rw-r--r--src/dabOutput/dabOutputTcp.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/dabOutput/dabOutputTcp.cpp b/src/dabOutput/dabOutputTcp.cpp
index 57dc706..7fb17ca 100644
--- a/src/dabOutput/dabOutputTcp.cpp
+++ b/src/dabOutput/dabOutputTcp.cpp
@@ -107,7 +107,7 @@ class TCPConnection
}
while (sent == 0);
}
- catch (std::runtime_error& e) {
+ catch (const std::runtime_error& e) {
m_running = false;
}
}
@@ -159,7 +159,7 @@ class TCPDataDispatcher
}
}
}
- catch (std::runtime_error& e) {
+ catch (const std::runtime_error& e) {
etiLog.level(error) << "TCPDataDispatcher caught runtime error: " << e.what();
m_running = false;
}
@@ -218,19 +218,10 @@ int DabOutputTcp::Open(const char* name)
if (success) {
dispatcher_ = make_shared<TCPDataDispatcher>();
- try {
- dispatcher_->start(port, address);
- }
- catch (std::runtime_error& e) {
- stringstream ss;
- ss << "Caught error during socket open of TCP output " << name;
- throw e;
- }
+ dispatcher_->start(port, address);
}
else {
- stringstream ss;
- ss << "Could not parse TCP output address " << name;
- throw std::runtime_error(ss.str());
+ throw runtime_error(string("Could not parse TCP output address ") + name);
}
return 0;
}