Commit d99eacd4 authored by Lukas Riedel's avatar Lukas Riedel

Add error if YAML parameter is not part of parameterization

parent c8e7db4b
......@@ -296,7 +296,17 @@ private:
{
const auto p_name = yaml_param.first.as<std::string>();
const auto p_value = yaml_param.second.as<double>();
parameter_values.at(p_name) = p_value;
// try to insert the value into the parameter map
try {
parameter_values.at(p_name) = p_value;
}
catch (std::out_of_range& e) {
_log->error(" Parameter '{}' not part of "
"parameterization '{}'",
p_name, type);
DUNE_THROW(IOError, "Error inserting parameter values");
}
}
ret.emplace(index, parameterization);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment