~ubuntu-branches/ubuntu/saucy/zeromq3/saucy

« back to all changes in this revision

Viewing changes to src/err.cpp

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-10-16 19:49:30 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20121016194930-98r0bi746eoaa4iv
Tags: 3.2.1~rc2+dfsg-1
* New upstream RC release (Closes: #690704)
* Bump Standards-Version to 3.9.4 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
    extra_info [0] = (ULONG_PTR) errmsg_;
73
73
    RaiseException (0x40000015, EXCEPTION_NONCONTINUABLE, 1, extra_info);
74
74
#else
 
75
    (void)errmsg_;
75
76
    abort ();
76
77
#endif
77
78
}
217
218
int zmq::wsa_error_to_errno (int errcode)
218
219
{
219
220
    switch (errcode) {
220
 
    case WSAEINPROGRESS:
221
 
        return EAGAIN;
 
221
//  10009 - File handle is not valid.
222
222
    case WSAEBADF:
223
223
        return EBADF;
 
224
//  10013 - Permission denied.
 
225
    case WSAEACCES:
 
226
        return EACCES;
 
227
//  10014 - Bad address.
 
228
    case WSAEFAULT:
 
229
        return EFAULT;
 
230
//  10022 - Invalid argument.
224
231
    case WSAEINVAL:
225
232
        return EINVAL;
 
233
//  10024 - Too many open files.
226
234
    case WSAEMFILE:
227
235
        return EMFILE;
228
 
    case WSAEFAULT:
229
 
        return EFAULT;
 
236
//  10036 - Operation now in progress.
 
237
    case WSAEINPROGRESS:
 
238
        return EAGAIN;
 
239
//  10040 - Message too long.
 
240
    case WSAEMSGSIZE:
 
241
        return EMSGSIZE;
 
242
//  10043 - Protocol not supported.
230
243
    case WSAEPROTONOSUPPORT:
231
244
        return EPROTONOSUPPORT;
232
 
    case WSAENOBUFS:
233
 
        return ENOBUFS;
234
 
    case WSAENETDOWN:
235
 
        return ENETDOWN;
 
245
//  10047 - Address family not supported by protocol family.
 
246
    case WSAEAFNOSUPPORT:
 
247
        return EAFNOSUPPORT;
 
248
//  10048 - Address already in use.
236
249
    case WSAEADDRINUSE:
237
250
        return EADDRINUSE;
 
251
//  10049 - Cannot assign requested address.
238
252
    case WSAEADDRNOTAVAIL:
239
253
        return EADDRNOTAVAIL;
240
 
    case WSAEAFNOSUPPORT:
241
 
        return EAFNOSUPPORT;
 
254
//  10050 - Network is down.
 
255
    case WSAENETDOWN:
 
256
        return ENETDOWN;
 
257
//  10051 - Network is unreachable.
 
258
    case WSAENETUNREACH:
 
259
        return ENETUNREACH;
 
260
//  10052 - Network dropped connection on reset.
 
261
    case WSAENETRESET:
 
262
        return ENETRESET;
 
263
//  10053 - Software caused connection abort.
 
264
    case WSAECONNABORTED:
 
265
        return ECONNABORTED;
 
266
//  10054 - Connection reset by peer.
 
267
    case WSAECONNRESET:
 
268
        return ECONNRESET;
 
269
//  10055 - No buffer space available.
 
270
    case WSAENOBUFS:
 
271
        return ENOBUFS;
 
272
//  10057 - Socket is not connected.
 
273
    case WSAENOTCONN:
 
274
        return ENOTCONN;
 
275
//  10060 - Connection timed out.
 
276
    case WSAETIMEDOUT:
 
277
        return ETIMEDOUT;
 
278
//  10061 - Connection refused.
 
279
    case WSAECONNREFUSED:
 
280
        return ECONNREFUSED;
 
281
//  10065 - No route to host.
 
282
    case WSAEHOSTUNREACH:
 
283
        return EHOSTUNREACH;
242
284
    default:
243
285
        wsa_assert (false);
244
286
    }