Runtime Error Mixin¶
runtime_error_mixin
¶
Mix-in for making forging-blocks errors catchable as built-in RuntimeError.
Defines RuntimeErrorMixin, which extends Python's built-in RuntimeError.
When listed before Error[...] in a class's bases, the mix-in ensures
isinstance(error, RuntimeError) returns True for that error and its
subclasses. Attach it to errors representing state violations, broken
invariants, and operational failures where except RuntimeError should apply.
RuntimeErrorMixin
¶
Bases: RuntimeError
Mixin — attach before Error[...] in MRO to make errors isinstance(RuntimeError).