diff options
author | Steven McCoy <steven.mccoy@miru.hk> | 2012-05-20 07:51:58 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-05-21 12:17:22 +0200 |
commit | c4881d317e3ec5b02d1e354fb54a56dc0618b717 (patch) | |
tree | 426af5b51690efd231850f2671920a296db6eed4 | |
parent | d75735c3dd1720ea816e2178847b1c76dfcb7e9f (diff) |
Improve error handling on Windows
-rw-r--r-- | src/err.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
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); } |