Josh Lloyd
7d58a197cf
py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions.
Fixes #5140 .
5 years ago
Damien George
b1b090255c
py/moduerrno: Make list of errno codes configurable.
It's configurable by defining MICROPY_PY_UERRNO_LIST. If this is not
defined then a default is provided.
8 years ago
Damien George
f563406d2e
py/moduerrno: Make uerrno.errorcode dict configurable.
It's configured by MICROPY_PY_UERRNO_ERRORCODE and enabled by default
(since that's the behaviour before this patch).
Without this dict the lookup of errno codes to strings must use the
uerrno module itself.
8 years ago
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