Merge pull request #525 from asuessenbach/check

Reduced exception on encountering an unknown element to a warning.
This commit is contained in:
Andreas Süßenbach 2020-02-27 09:37:02 +01:00 committed by GitHub
commit 9bc920a8c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,7 +210,7 @@ void checkElements(int line, std::vector<tinyxml2::XMLElement const*> const& ele
{
std::string value = e->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)
{