[xgl] Fail if file could not be parsed.

Fail instead of returning empty scene.

Partially addresses #3888.

TODO: Propagate XML error detail through exception (depends on #3881).
This commit is contained in:
Jason C
2021-05-05 17:49:10 -04:00
parent 98f586c8d4
commit de5c8ece6f

View File

@@ -200,7 +200,7 @@ void XGLImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
// parse the XML file
mXmlParser = new XmlParser;
if (!mXmlParser->parse(stream.get())) {
return;
throw DeadlyImportError("XML parse error while loading XGL file ", pFile);
}
TempScope scope;