From a5738529e822c4ab3f5bf53b88c8709af84f006d Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Sun, 11 Feb 2018 12:18:29 +0100 Subject: [PATCH] Problem: wsa_assert does not include error code Solution: extend output of wsa_assert --- src/err.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/err.hpp b/src/err.hpp index 2381352b..5bda5bb1 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -78,8 +78,8 @@ int wsa_error_to_errno (int errcode); if (unlikely (!(x))) { \ const char *errstr = zmq::wsa_error (); \ if (errstr != NULL) { \ - fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ - __FILE__, __LINE__); \ + fprintf (stderr, "Assertion failed: %s [%i] (%s:%d)\n", \ + errstr, WSAGetLastError (), __FILE__, __LINE__); \ fflush (stderr); \ zmq::zmq_abort (errstr); \ } \