Files
markitect-main/domain/projects/exceptions.py
tegwick 0606115104 feat: Implement domain logic separation with clean architecture
- Created complete domain layer with pure business logic
- Implemented Issue domain models with 48 passing tests
- Implemented Project domain models with 31 passing tests
- Added domain services for complex business operations
- Established clean separation between domain, application, and infrastructure
- All 250 tests passing with no breaking changes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 22:15:45 +02:00

28 lines
800 B
Python

"""
Domain-specific exceptions for project management.
"""
class ProjectDomainError(Exception):
"""Base exception for project domain errors."""
def __init__(self, message: str, project_name: str = None):
super().__init__(message)
self.project_name = project_name
class ProjectValidationError(ProjectDomainError):
"""Exception raised when project validation fails."""
def __init__(self, message: str, field: str = None, value=None):
super().__init__(message)
self.field = field
self.value = value
class MilestoneError(ProjectDomainError):
"""Exception raised when milestone operations fail."""
def __init__(self, message: str, milestone_id: int = None):
super().__init__(message)
self.milestone_id = milestone_id