function error.type
Derive a new error type from this one.
The new type inherits every field of this type and adds
fields.
Its instances are also instances of this type and of each of its
ancestors, for both isinstance and type annotations. The name comes
from the variable the type is first assigned to, so declare error types
at module top level.
fields maps each field name to a type, or to attr(type, default = ...)
for an optional field, as trait() does. message, stacktrace and
cause are reserved, and an inherited field cannot be redeclared.
traceback decides how an error of this type renders when it escapes
the task. True shows the traceback, as for a bug. False prints the
message alone as an ERROR: line and exits with code 1, as
ctx.std.process.exit does: use it for expected refusals. Unset, it is
inherited; the root error has True.
property error.cause
The error that led to this one, or
None.
property error.message
What went wrong, as given to the constructor.
str(e) returns it too.
property error.stacktrace
Where the error was constructed, as a list of frames, outermost call first. For an error the runtime built from a failed operation, it is where that failure reached AXL, e.g. the
future.block() call.
