mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Print a warning when encountering unknown tags in the xml spec instead of aborting with an exception. (#222)
This commit is contained in:
parent
ea22107198
commit
3f9ca5433a
@ -971,8 +971,7 @@ void checkElements(std::vector<tinyxml2::XMLElement const*> const& elements, std
|
||||
std::stringstream ss;
|
||||
ss << e->GetLineNum();
|
||||
std::string lineNumber = ss.str();
|
||||
assert(false);
|
||||
throw std::runtime_error("Spec error on line " + lineNumber + ": unexpected element value <" + e->Value() + ">");
|
||||
std::cerr << "Unknown element in spec on line: " << lineNumber << " " << e->Value() << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5094,7 +5093,7 @@ int main( int argc, char **argv )
|
||||
{
|
||||
std::stringstream lineNumber;
|
||||
lineNumber << child->GetLineNum();
|
||||
throw std::runtime_error(std::string("unknown tag ") + value + " at line number:" + lineNumber.str());
|
||||
std::cerr << "Unhandled tag " << value << " at line number: " << lineNumber.str() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user