}
if (server) {
if ((_endpoint = nn_bind(_socket, NANOMSG_URL)) < 0) {
- throw runtime_error(String::compose("Could not bind nanomsg socket (%1)", errno));
+ throw runtime_error(dcp::compose("Could not bind nanomsg socket (%1)", errno));
}
} else {
if ((_endpoint = nn_connect(_socket, NANOMSG_URL)) < 0) {
- throw runtime_error(String::compose("Could not connect nanomsg socket (%1)", errno));
+ throw runtime_error(dcp::compose("Could not connect nanomsg socket (%1)", errno));
}
}
}
if (errno == ETIMEDOUT || errno == EAGAIN) {
return false;
}
- throw runtime_error(String::compose("Could not send to nanomsg socket (%1)", errno));
+ throw runtime_error(dcp::compose("Could not send to nanomsg socket (%1)", errno));
} else if (r != int(s.length())) {
throw runtime_error("Could not send to nanomsg socket (message too big)");
}