"""Shared exception classes for the RLM package."""

from __future__ import annotations

from typing import Any


class SandboxError(Exception):
    """Raised when sandbox execution fails."""
    pass


class BatchLLMError(SandboxError):
    """Raised when a batch LLM request returns one or more errors."""

    def __init__(self, message: str, errors: list[dict[str, Any]]) -> None:
        super().__init__(message)
        self.errors = errors
