APIs
The Minder
context manager is given a Duty
for the duration of its context block.
It exits without raising if an error is encountered by recording it in error
.
Minder ¶
Exceptions raised in this ContextManager become stored as error
.
Attributes:
Name | Type | Description |
---|---|---|
result |
A dict which holds the result. |
|
failed |
A flag indicating whether the operation failed. |
duty ¶
Prepare to record a Duty
associated with this result.
record_breach ¶
Record the serialised error
message and its location where
in the result
.
report ¶
Provide a simple interface: result
and success
bool.
If the operation failed the result
will be a dict of an error
message
and where
(the location of the Duty
in which the exception raised).
Duty ¶
Ensures any exception is handled and stored in result
upon early exit.
Prepare to report where
the breach occurred, and whether to suppress the
exception (if recoverable
the error will not halt further execution upon
exit of the Duty
context manager block).