@fluent<EOL><INDENT>def error(self, error):<DEDENT>
self._error = RuntimeError(error) if isinstance(error, str) else error<EOL>
Defines a simulated exception error that will be raised.

Arguments:
    error (str|Exception): error to raise.

Returns:
    self: current Mock instance.