Coverage for src / ai_shell / exceptions.py: 100%
12 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-14 22:12 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-14 22:12 +0000
1"""Custom exceptions for ai-shell."""
4class AiShellError(Exception):
5 """Base exception for ai-shell."""
8class DockerNotAvailableError(AiShellError):
9 """Docker daemon is not running or not installed."""
12class ImagePullError(AiShellError):
13 """Failed to pull Docker image."""
15 def __init__(self, image: str, reason: str) -> None:
16 self.image = image
17 self.reason = reason
18 super().__init__(f"Failed to pull {image}: {reason}")
21class ContainerNotFoundError(AiShellError):
22 """Container does not exist."""
24 def __init__(self, name: str) -> None:
25 self.name = name
26 super().__init__(f"Container '{name}' not found")
29class ConfigError(AiShellError):
30 """Invalid configuration."""