Skip to content

Commit

Permalink
Throw exception when model parameter set is not found in DynaWaltzPar…
Browse files Browse the repository at this point in the history
…ameters (#310)

Signed-off-by: lisrte <[email protected]>
  • Loading branch information
Lisrte authored Dec 11, 2023
1 parent 91dbe51 commit 00449ae
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ public String getName() {
}

public ParametersSet getModelParameters(String parameterSetId) {
return modelsParameters.get(parameterSetId);
ParametersSet parametersSet = modelsParameters.get(parameterSetId);
if (parametersSet == null) {
throw new PowsyblException("Model parameter set " + parameterSetId + " not found");
}
return parametersSet;
}

@JsonGetter("modelsParameters")
Expand Down

0 comments on commit 00449ae

Please sign in to comment.