Skip to content

Exceptions

Custom exceptions for the Orche library.

CommandError

Bases: OrcheError

Raised when a command is not found in the registry.

Source code in orche/exceptions.py
16
17
18
19
class CommandError(OrcheError):
    """Raised when a command is not found in the registry."""

    pass

ConfigError

Bases: OrcheError

Raised for invalid configuration (e.g. missing compose files, bad params).

Source code in orche/exceptions.py
37
38
39
40
class ConfigError(OrcheError):
    """Raised for invalid configuration (e.g. missing compose files, bad params)."""

    pass

DockerComposeError

Bases: OrcheError

Raised when a docker-compose command fails.

Source code in orche/exceptions.py
10
11
12
13
class DockerComposeError(OrcheError):
    """Raised when a docker-compose command fails."""

    pass

HookError

Bases: OrcheError

Raised when a command hook fails during execution.

Source code in orche/exceptions.py
22
23
24
25
26
27
28
class HookError(OrcheError):
    """Raised when a command hook fails during execution."""

    def __init__(self, hook_type: str, command: str, cause: Exception) -> None:
        self.hook_type = hook_type
        self.command = command
        super().__init__(f"{hook_type}-hook for '{command}' failed: {cause}")

OrcheError

Bases: Exception

Base exception for all Orche errors.

Source code in orche/exceptions.py
4
5
6
7
class OrcheError(Exception):
    """Base exception for all Orche errors."""

    pass

OrchefileError

Bases: OrcheError

Raised when the orchefile cannot be loaded or is invalid.

Source code in orche/exceptions.py
31
32
33
34
class OrchefileError(OrcheError):
    """Raised when the orchefile cannot be loaded or is invalid."""

    pass