Skip to content
Snippets Groups Projects
Commit 1cc1dd6e authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Merge branch 'MPL_medium_property_error_msg' into 'master'

<MPL> Medium throws an error if a property is not defined in the input file

See merge request ogs/ogs!3337
parents f1b7da1e ebde0c72
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,12 @@ Phase const& Medium::phase(std::string const& name) const
Property const& Medium::property(PropertyType const& p) const
{
Property const* const property = properties_[p].get();
if (property == nullptr)
{
OGS_FATAL("Trying to access undefined property '{:s}' of {:s}",
property_enum_to_string[p], description());
}
return *properties_[p];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment