Repository URL to install this package:
|
Version:
1.1.3 ▾
|
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)
)