Paul Sokolovsky
5da8de2b66
extmod/modlwip: Fix error codes for duplicate calls to connect().
...
If socket is already connected, POSIX requires returning EISCONN. If
connection was requested, but not yet complete (for non-blocking
socket), error code is EALREADY.
http://pubs.opengroup.org/onlinepubs/7908799/xns/connect.html
2017-06-04 12:30:41 +03:00
Paul Sokolovsky
2ec0ee082a
py/moduerrno: Add ECONNREFUSED, one of frequent networking errors.
2016-05-28 00:17:19 +03:00
Damien George
9a92499641
py/objexcept: Don't convert errno to str in constructor, do it in print.
...
OSError's are now printed like:
OSError: [Errno 1] EPERM
but only if the string corresponding to the errno is found.
2016-05-12 14:27:52 +01:00
Damien George
d45e5f8c35
py: Add mp_errno_to_str() and use it to provide nicer OSError msgs.
...
If an OSError is raised with an integer argument, and that integer
corresponds to an errno, then the string for the errno is used as the
argument to the exception, instead of the integer. Only works if
the uerrno module is enabled.
2016-05-12 13:20:40 +01:00
Damien George
c9a7430dbe
py/mperrno: Add some more MP_Exxx constants, related to networking.
2016-05-12 12:48:47 +01:00
Damien George
83a9a723b9
py/mperrno: Add EAFNOSUPPORT definition.
2016-05-10 23:44:59 +01:00
Damien George
3f56fd64b8
py: Add mperrno.h file with uPy defined errno constants.
2016-05-10 23:30:39 +01:00