New archi: domain driven development
Working but need to check out code
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Shared domain exceptions."""
|
||||
|
||||
|
||||
class DomainException(Exception):
|
||||
"""Base exception for all domain-related errors."""
|
||||
pass
|
||||
|
||||
|
||||
class ValidationError(DomainException):
|
||||
"""Raised when domain validation fails."""
|
||||
pass
|
||||
|
||||
|
||||
class NotFoundError(DomainException):
|
||||
"""Raised when a domain entity is not found."""
|
||||
pass
|
||||
|
||||
|
||||
class AlreadyExistsError(DomainException):
|
||||
"""Raised when trying to create an entity that already exists."""
|
||||
pass
|
||||
Reference in New Issue
Block a user