class CasaGeoError(Exception):
    # TODO: Exception hierarchy wrapping low-level and API errors.
    pass


class InsufficientCreditsError(CasaGeoError):
    def __init__(
        self, message: str = "Insufficient credits", *, required: int, available: int
    ):
        super().__init__(f"{message} ({required} required, {available} available)")
        self.required = required
        self.available = available


class CasaGeoNotImplementedWarning(Warning):
    pass
