Skip to content

Commit

Permalink
Improve error message when merging fails
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Nov 28, 2024
1 parent c644dc9 commit ce2c3c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/ert/config/design_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/ert/run_models/ensemble_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce2c3c6

Please sign in to comment.