Error
Error is raised for system and I/O failures.
It can be subclassed for library-specific operational failures.
Constructor
Error message :code?
Creates a system error.
Parameters:
| Name | Type | Description |
|---|---|---|
| message | str |
Error message |
| code | ErrorCode? |
Underlying platform code |
str(err) returns the underlying system error message and appends the native
symbolic code in parentheses when it is known.
Fields
code
code contains the underlying native system error code when one exists:
The value is sys.linux.Errno,
sys.freebsd.Errno,
sys.macos.Errno, or
sys.windows.WinError, according to the system where
the error originated. Errors without a native code expose nil.