builtins.RuntimeError = class RuntimeError(Exception)
| Use Case | Command | Description |
|---|---|---|
| Raising a RuntimeError | raise RuntimeError("message") | Trigger an unspecified run-time error |
| Catching a RuntimeError | except RuntimeError as e: | Handle the exception in a try block |
| Creating a custom exception | class MyError(RuntimeError): pass | Subclass RuntimeError for custom error types |
Unspecified run-time error.
RuntimeErrorExceptionBaseExceptionobjectNotImplementedErrorRecursionError__init__(self, /, *args, **kwargs) — Initialize self. See help(type(self)) for accurate signature.__new__(*args, **kwargs) from builtins.type — Create and return a new object. See help(type) for accurate signature.__delattr__(self, name, /) — Implement delattr(self, name).__getattribute__(self, name, /) — Return getattr(self, name).__reduce__(...) — Helper for pickle.__repr__(self, /) — Return repr(self).__setattr__(self, name, value, /) — Implement setattr(self, name, value).__setstate__(...)__str__(self, /) — Return str(self).with_traceback(...) — Exception.with_traceback(tb) — set self.__traceback__ to tb and return self.__cause__ — exception cause__context__ — exception context__dict____suppress_context____traceback__argsGenerated by phpman v4.9.27-3-g515571d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-20 00:27 @216.73.216.114
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format