"""Custom exception hierarchy for ABREKA."""


class AbrekaError(Exception):
    """Base exception for all ABREKA errors."""


class ConfigNotFoundError(AbrekaError):
    """Raised when abreka/config.toml cannot be found."""


class ExperimentNotFoundError(AbrekaError):
    """Raised when a referenced experiment does not exist."""


class BacklogItemNotFoundError(AbrekaError):
    """Raised when a referenced backlog item does not exist."""


class InvalidExperimentStatusError(AbrekaError):
    """Raised when an experiment status transition is invalid."""


class PiRpcError(AbrekaError):
    """Raised when pi-rpc communication fails."""


class MetricParseError(AbrekaError):
    """Raised when a metric specification cannot be parsed."""


class PromptTemplateError(AbrekaError):
    """Raised when a prompt template cannot be loaded or rendered."""
