Method
__init__
(self, kind: str, message: str, context: dict | None = None)
Source from the content-addressed store, hash-verified
| 40 | __slots__ = ("kind", "message", "context") |
| 41 | |
| 42 | def __init__(self, kind: str, message: str, context: dict | None = None) -> None: |
| 43 | self.kind = kind |
| 44 | self.message = message |
| 45 | self.context = context or {} |
| 46 | # Build a useful str() — RuntimeError uses the first arg. |
| 47 | super().__init__(self._format()) |
| 48 | |
| 49 | def _format(self) -> str: |
| 50 | if self.context: |
Tested by
no test coverage detected