""" Custom Exception classes used throughout the application """ class SnowflakeExecError(Exception): """Snowflake exception wwrapper.""" def __init__(self, message: str): self.message = message def __str__(self) -> str: return self.message class KafkaSendError(Exception): """Kafka exception wrapper.""" def __init__(self, message: str): self.message = message def __str__(self) -> str: return self.message class KafkaDLQError(Exception): """Kafka exception wrapper.""" def __init__(self, message: str): self.message = message def __str__(self) -> str: return self.message class LockAcquisitionError(Exception): """Kafka exception wrapper.""" def __str__(self) -> str: return 'Was not able to acquire deploy lock. Please try again later.' class JobListGenerationError(Exception): """JobList generation exception wrapper.""" def __init__(self, message: str): self.message = message def __str__(self) -> str: return f'Cannot generate a JobList. Error: {self.message}'