Coverage for src / ezqt_app / domain / errors / base.py: 90.91%
11 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-06 13:12 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-06 13:12 +0000
1# ///////////////////////////////////////////////////////////////
2# DOMAIN.ERRORS.BASE - Base domain exceptions
3# Project: ezqt_app
4# ///////////////////////////////////////////////////////////////
6"""Base exception hierarchy for ezqt_app."""
8from __future__ import annotations
10# ///////////////////////////////////////////////////////////////
11# IMPORTS
12# ///////////////////////////////////////////////////////////////
13# Standard library imports
14from dataclasses import dataclass
16# Local imports
17from ...shared.types import JsonMap
20# ///////////////////////////////////////////////////////////////
21# DATACLASSES
22# ///////////////////////////////////////////////////////////////
23@dataclass(slots=True)
24class EzQtError(Exception):
25 """Base typed exception for all application-specific errors."""
27 code: str
28 message: str
29 context: JsonMap | None = None
31 def __str__(self) -> str:
32 return self.message
35class DomainError(EzQtError):
36 """Base domain-layer error."""