from __future__ import annotations


class RipsGenerationError(ValueError):
    def __init__(self, errors: list[str]):
        self.errors = [str(item).strip() for item in errors if str(item).strip()]
        message = "; ".join(self.errors) if self.errors else "No fue posible generar el RIPS."
        super().__init__(message)

