Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
sarus-llm / sarus_llm / config / _errors.py
Size: Mime:
from typing import List


class ConfigError(Exception):
    """
    Raised when the yaml config is not well-formed. Prints all the collected
    errors at once.

    Args:
        errors (List[Exception]): exceptions found when validating `_component_`
            fields in the config
    """

    def __init__(self, errors: List[Exception]):
        self.errors = errors

    def __str__(self):
        error_messages = [f"{type(e).__name__}: {str(e)}" for e in self.errors]
        return (
            "Config is not well-formed, found the following errors: \n"
            + "\n".join(error_messages)
        )