arch-design-agent-skill-das.../backend/app/shared/kernel/exceptions.py

19 lines
581 B
Python

class NotFoundError(Exception):
def __init__(self, entity: str, entity_id: str) -> None:
self.entity = entity
self.entity_id = entity_id
super().__init__(f"{entity} not found: {entity_id}")
class ValidationError(Exception):
def __init__(self, message: str) -> None:
self.message = message
super().__init__(message)
class FileSystemError(Exception):
def __init__(self, path: str, message: str) -> None:
self.path = path
self.message = message
super().__init__(f"Filesystem error at {path}: {message}")