"""Custom error classes for ASA CLI v2."""


class AsaError(Exception):
    """Base error for all ASA operations."""


class SliceAlreadyExistsError(AsaError):
    """Slice directory already exists."""


class SliceNotFoundError(AsaError):
    """Slice directory not found."""


class ContractMissingError(AsaError):
    """slice.contract.json not found."""


class ContractValidationError(AsaError):
    """Contract failed Pydantic validation."""


class SpecValidationError(AsaError):
    """slice.spec.md parsing/validation failed."""


class RegenerationError(AsaError):
    """Marker-based regeneration failed (missing/mismatched markers)."""


class ModuleNotFoundError(AsaError):
    """Requested module does not exist in registry."""


class ModuleDependencyError(AsaError):
    """Module dependency not satisfied (prerequisite not installed)."""


class ModuleVersionError(AsaError):
    """CLI version too old for module or stack mismatch."""


class ConfigNotFoundError(AsaError):
    """asa.config.json not found in project."""


class LintError(AsaError):
    """Lint check found violations."""


class DeployError(AsaError):
    """Deployment pre-check or execution failed."""
