Damien George
93c4a6a3f7
all: Remove 'name' member from mp_obj_module_t struct.
One can instead lookup __name__ in the modules dict to get the value.
8 years ago
Paul Sokolovsky
2ec0ee082a
py/moduerrno: Add ECONNREFUSED, one of frequent networking errors.
9 years ago
Paul Sokolovsky
c76acd8c23
py/moduerrno: Add EEXIST, EISDIR.
Useful to check file/dir operations result, in particular used by upip.
9 years ago
Paul Sokolovsky
10503f3534
py/moduerrno: Add EACCES, pretty common error on Unix.
9 years ago
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.
9 years ago
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.
9 years ago
Damien George
47bf6ba61a
py/moduerrno: Add more constants to the errno module.
9 years ago
Damien George
596a3feb8f
py: Add uerrno module, with errno constants and dict.
9 years ago