18 lines
427 B
Python
18 lines
427 B
Python
import logging
|
|
|
|
|
|
class ProductorServiceError(Exception):
|
|
def __init__(self, message: str):
|
|
super().__init__(message)
|
|
logging.error('ProductorService : %s', message)
|
|
|
|
|
|
class ProductorNotFoundError(ProductorServiceError):
|
|
pass
|
|
|
|
|
|
class ProductorCreateError(ProductorServiceError):
|
|
def __init__(self, message: str, field: str | None = None):
|
|
super().__init__(message)
|
|
self.field = field
|