Skip to content

Commit

Permalink
pybamm-team#4120 improved error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubham16 committed Jun 24, 2024
1 parent 853417c commit 0c7df33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pybamm/parameters/parameter_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def __init__(self, values, chemistry=None):
values.pop("chemistry", None)
self.update(values, check_already_exists=False)
else:
raise ValueError("Invalid Parameter Value")
valid_sets = "\n".join(pybamm.parameter_sets.keys())
raise ValueError(f"{values} is not a valid parameter set. Parameter set must be one of:\n {valid_sets} ")

# Initialise empty _processed_symbols dict (for caching)
self._processed_symbols = {}
Expand Down

0 comments on commit 0c7df33

Please sign in to comment.