From e136d923b7060ef64d44264f88e49057e6638f31 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 22 Sep 2009 11:52:35 +0200 Subject: ZMQ-specific error codes added --- src/err.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/err.cpp') diff --git a/src/err.cpp b/src/err.cpp index bca0c03..ef5b987 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -24,11 +24,16 @@ const char *zmq::wsa_error() { + + int errcode = WSAGetLastError (); // TODO: This is not a generic way to handle this... if (errcode == WSAEWOULDBLOCK) return NULL; + // TODO: It seems that list of Windows socket errors is longer than this. + // Investigate whether there's a way to convert it into the string + // automatically (wsaError->HRESULT->string?). return (errcode == WSABASEERR) ? "No Error" : -- cgit v1.2.3