From b6e35c4340d45f47041c722ac9226cd1461069dd Mon Sep 17 00:00:00 2001 From: b8raoult <53792887+b8raoult@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:34:11 +0000 Subject: [PATCH] bugfix raise error for config issue (#51) --- src/anemoi/utils/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/anemoi/utils/config.py b/src/anemoi/utils/config.py index 3a9406a..64da8d0 100644 --- a/src/anemoi/utils/config.py +++ b/src/anemoi/utils/config.py @@ -207,7 +207,7 @@ def load_any_dict_format(path) -> dict: return tomllib.load(f) except (json.JSONDecodeError, yaml.YAMLError, tomllib.TOMLDecodeError) as e: LOG.warning(f"Failed to parse config file {path}", exc_info=e) - return ValueError(f"Failed to parse config file {path} [{e}]") + raise ValueError(f"Failed to parse config file {path} [{e}]") return open(path).read()