Error
Error is raised for system and I/O failures.
It can be subclassed for library-specific operational failures.
Inherits from: std.RuntimeError
Constructor
Error message …
Creates a system error.
Parameters
| Name | Type | Description |
|---|---|---|
message |
Str |
Error message. |
:code? |
ErrorCode |
Underlying platform code. |
Example
str(err) returns the underlying system error message and appends the native
symbolic code in parentheses when it is known.
Fields
code @ (ErrorCode | nil)The underlying native system error code, or
nilwhen one does not exist.The value is
sys.linux.Errno,sys.freebsd.Errno,sys.macos.Errno, orsys.windows.WinError, according to the system where the error originated.