"""Exception classes for redis-fs."""


class RedisFsError(Exception):
    """Base exception for all redis-fs errors."""

    pass


class ConfigurationError(RedisFsError):
    """Invalid constructor arguments or configuration."""

    pass


class NotFoundError(RedisFsError):
    """File or path does not exist."""

    def __init__(self, path: str, message: str | None = None):
        self.path = path
        super().__init__(message or f"Path not found: {path}")


class ConnectionError(RedisFsError):
    """Redis or filesystem connection failure."""

    pass


class SyncError(RedisFsError):
    """Error during sync operations."""

    pass
