Replace exit()s with exceptions

This commit is contained in:
Alexey Rybalchenko
2020-05-17 13:58:24 +02:00
parent 4b516de81a
commit b56e32eb11
4 changed files with 30 additions and 26 deletions

View File

@@ -40,7 +40,7 @@ class Socket final : public fair::mq::Socket
{
if (fSocket == nullptr) {
LOG(error) << "Failed creating socket " << fId << ", reason: " << zmq_strerror(errno);
exit(EXIT_FAILURE);
throw SocketError(tools::ToString("Unavailable transport requested: ", type));
}
if (zmq_setsockopt(fSocket, ZMQ_IDENTITY, fId.c_str(), fId.length()) != 0) {