From c4881d317e3ec5b02d1e354fb54a56dc0618b717 Mon Sep 17 00:00:00 2001 From: Steven McCoy Date: Sun, 20 May 2012 07:51:58 +0200 Subject: Improve error handling on Windows --- src/err.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src') diff --git a/src/err.cpp b/src/err.cpp index f9549ff..e330ed2 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -246,6 +246,33 @@ void xs::wsa_error_to_errno () case WSAEACCES: errno = EACCES; return; + case WSAENETRESET: + errno = ENETRESET; + return; + case WSAENETUNREACH: + errno = ENETUNREACH; + return; + case WSAEHOSTUNREACH: + errno = EHOSTUNREACH; + return; + case WSAENOTCONN: + errno = ENOTCONN; + return; + case WSAEMSGSIZE: + errno = EMSGSIZE; + return; + case WSAETIMEDOUT: + errno = ETIMEDOUT; + return; + case WSAECONNREFUSED: + errno = ECONNREFUSED; + return; + case WSAECONNABORTED: + errno = ECONNABORTED; + return; + case WSAECONNRESET: + errno = ECONNRESET; + return; default: wsa_assert (false); } -- cgit v1.2.3