Reduced exception on encountering an unknown element to a warning.

This commit is contained in:
asuessenbach 2020-02-27 08:58:57 +01:00
parent a1f8fb13cd
commit 0d65f6a142

View File

@ -210,7 +210,7 @@ void checkElements(int line, std::vector<tinyxml2::XMLElement const*> const& ele
{ {
std::string value = e->Value(); std::string value = e->Value();
encountered[value]++; encountered[value]++;
check((required.find(value) != required.end()) || (optional.find(value) != optional.end()), e->GetLineNum(), "unknown element <" + value + ">"); warn((required.find(value) != required.end()) || (optional.find(value) != optional.end()), e->GetLineNum(), "unknown element <" + value + ">");
} }
for (auto const& r : required) for (auto const& r : required)
{ {