Files
luban-lite-t3e-pro/packages/third-party/micropython-1.13.0/docs/std-librarys/uerrno.md
刘可亮 803cac77d5 V1.0.6
2024-09-03 11:16:08 +08:00

553 B
Executable File
Raw Blame History

uerrno 系统错误码模块

uerrno 模块提供了标准的 errno 系统符号,每个符号都有对应的整数值。

示例

try:
    uos.mkdir("my_dir")
except OSError as exc:
    if exc.args[0] == uerrno.EEXIST:
        print("Directory already exists")
uerrno.errorcode
Dictionary mapping numeric error codes to strings with symbolic error code (see above):

>>> print(uerrno.errorcode[uerrno.EEXIST])
EEXIST

更多内容可参考 uerrno