Coverage for src/zapy/base/exceptions.py: 100%
13 statements
« prev ^ index » next coverage.py v7.4.1, created at 2024-02-10 19:35 +0000
« prev ^ index » next coverage.py v7.4.1, created at 2024-02-10 19:35 +0000
1from typing import Any
4class HandledError(Exception):
5 pass
8class ZapyError(Exception):
9 namespace: str
10 identifier: str
11 context: dict[str, Any]
13 def __init__(self, *args: Any, **kwargs: Any) -> None:
14 super().__init__(*args, **kwargs)
15 self.context = {}
17 @property
18 def error_type(self) -> str:
19 return f"{self.namespace}:{self.identifier}"