Coverage for dao/exceptions.py: 50.00%
6 statements
« prev ^ index » next coverage.py v7.10.6, created at 2026-04-13 00:07 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2026-04-13 00:07 +0000
1"""DAO-level exceptions for better error handling."""
4class DAOError(Exception):
5 """Base exception for DAO operations."""
7 pass
10class DuplicateRecordError(DAOError):
11 """Raised when attempting to insert a duplicate record."""
13 def __init__(self, message: str = "Record already exists", details: str | None = None):
14 self.message = message
15 self.details = details
16 super().__init__(self.message)