From ce2c3c6bf3dff3103cb9359168e7876e6094dd43 Mon Sep 17 00:00:00 2001 From: xjules Date: Thu, 28 Nov 2024 10:16:26 +0100 Subject: [PATCH] Improve error message when merging fails --- src/ert/config/design_matrix.py | 6 +++++- src/ert/run_models/ensemble_experiment.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ert/config/design_matrix.py b/src/ert/config/design_matrix.py index d5ff6ecb62d..c8fcb7e0622 100644 --- a/src/ert/config/design_matrix.py +++ b/src/ert/config/design_matrix.py @@ -123,7 +123,11 @@ def merge_with_existing_parameters( design_group_added = True elif set(design_keys) & set(existing_keys): raise ConfigValidationError( - "Overlapping parameter names found in design matrix!" + ( + "Overlapping parameter names found in design matrix!\n" + f"{DESIGN_MATRIX_GROUP}:{design_keys}\n{parameter_group.name}:{existing_keys}" + "\nThey need to much exactly or not at all." + ) ) else: new_param_config += [parameter_group] diff --git a/src/ert/run_models/ensemble_experiment.py b/src/ert/run_models/ensemble_experiment.py index 04517985429..1b51125bc24 100644 --- a/src/ert/run_models/ensemble_experiment.py +++ b/src/ert/run_models/ensemble_experiment.py @@ -75,7 +75,7 @@ def run_experiment( design_matrix.merge_with_existing_parameters(parameters_config) ) except ConfigValidationError as exc: - raise ErtRunError("Failed to merge design matrix parameters") from exc + raise ErtRunError(str(exc)) from exc assert design_matrix.active_realizations is not None self.active_realizations = design_matrix.active_realizations