Coverage for frappe_manager / docker / compose_exceptions.py: 38%
16 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-07-02 18:13 +0530
« prev ^ index » next coverage.py v7.13.5, created at 2026-07-02 18:13 +0530
1class ComposeFileException(Exception):
2 """Exception raised for Docker Compose file errors."""
4 def __init__(self, error_msg: str, exception: Exception | None = None):
5 error_msg = f"{error_msg}"
6 if exception:
7 error_msg = f"{error_msg}\nException : {exception}"
8 super().__init__(error_msg)
11class ComposeServiceNotFound(Exception):
12 """Exception raised when a Docker Compose service is not found."""
14 def __init__(self, service_name: str, message: str = "Compose service not found.") -> None:
15 self.msg = service_name + " " + message
16 super().__init__(self.msg)
19class ComposeSecretNotFoundError(Exception):
20 """Exception raised when a Docker Compose secret value is not found."""
22 def __init__(self, secret_name, compose_file_path: str, message="Docker Compose at {} secret value not found"):
23 self.secret_name = secret_name
24 self.compose_file_path = compose_file_path
25 self.message = f"{message.format(self.compose_file_path)}: {secret_name}"
26 super().__init__(self.message)