Files
markitect-main/domain/issues/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

29 lines
866 B
Python

"""
Domain-specific exceptions for issue management.
"""
class IssueDomainError(Exception):
"""Base exception for issue domain errors."""
def __init__(self, message: str, issue_number: int = None):
super().__init__(message)
self.issue_number = issue_number
class IssueValidationError(IssueDomainError):
"""Exception raised when issue validation fails."""
def __init__(self, message: str, field: str = None, value=None):
super().__init__(message)
self.field = field
self.value = value
class IssueStateError(IssueDomainError):
"""Exception raised when invalid state transitions are attempted."""
def __init__(self, message: str, current_state: str, attempted_state: str):
super().__init__(message)
self.current_state = current_state
self.attempted_state = attempted_state