New archi: domain driven development
Working but need to check out code
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""Movie domain exceptions."""
|
||||
from ..shared.exceptions import DomainException, NotFoundError
|
||||
|
||||
|
||||
class MovieNotFound(NotFoundError):
|
||||
"""Raised when a movie is not found."""
|
||||
pass
|
||||
|
||||
|
||||
class InvalidMovieData(DomainException):
|
||||
"""Raised when movie data is invalid."""
|
||||
pass
|
||||
|
||||
|
||||
class MovieAlreadyExists(DomainException):
|
||||
"""Raised when trying to add a movie that already exists."""
|
||||
pass
|
||||
Reference in New Issue
Block a user