From 7cba56319b6855b189c80323f2150657901e6442 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 19 Apr 2014 14:10:24 +0200 Subject: Report zmq error in exception --- src/dabInputZmq.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/dabInputZmq.cpp b/src/dabInputZmq.cpp index 956481c..9955fe3 100644 --- a/src/dabInputZmq.cpp +++ b/src/dabInputZmq.cpp @@ -158,7 +158,8 @@ void DabInputZmqBase::rebind() } catch (zmq::error_t& err) { std::ostringstream os; - os << "ZMQ set encoder key for input " << m_name << " failed"; + os << "ZMQ set encoder key for input " << m_name << " failed" << + err.what(); throw std::runtime_error(os.str()); } @@ -168,7 +169,8 @@ void DabInputZmqBase::rebind() } catch (zmq::error_t& err) { std::ostringstream os; - os << "ZMQ set public key for input " << m_name << " failed"; + os << "ZMQ set public key for input " << m_name << " failed" << + err.what(); throw std::runtime_error(os.str()); } @@ -178,7 +180,8 @@ void DabInputZmqBase::rebind() } catch (zmq::error_t& err) { std::ostringstream os; - os << "ZMQ set secret key for input " << m_name << " failed"; + os << "ZMQ set secret key for input " << m_name << " failed" << + err.what(); throw std::runtime_error(os.str()); } } @@ -192,7 +195,8 @@ void DabInputZmqBase::rebind() } catch (zmq::error_t& err) { std::ostringstream os; - os << "ZMQ remove keys for input " << m_name << " failed"; + os << "ZMQ remove keys for input " << m_name << " failed: " << + err.what(); throw std::runtime_error(os.str()); } @@ -204,7 +208,8 @@ void DabInputZmqBase::rebind() } catch (zmq::error_t& err) { std::ostringstream os; - os << "ZMQ bind for input " << m_name << " failed"; + os << "ZMQ bind for input " << m_name << " failed" << + err.what(); throw std::runtime_error(os.str()); } @@ -215,7 +220,8 @@ void DabInputZmqBase::rebind() } catch (zmq::error_t& err) { std::ostringstream os; - os << "ZMQ set socket options for input " << m_name << " failed"; + os << "ZMQ set socket options for input " << m_name << " failed" << + err.what(); throw std::runtime_error(os.str()); } } -- cgit v1.2.3