Remove try catch(...) on gltf2 importer
Better to throw exception than hide it ?pull/2081/head
parent
319cd64930
commit
3c37fbdc6b
|
@ -117,13 +117,9 @@ bool glTF2Importer::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool
|
||||||
|
|
||||||
if (pIOHandler) {
|
if (pIOHandler) {
|
||||||
glTF2::Asset asset(pIOHandler);
|
glTF2::Asset asset(pIOHandler);
|
||||||
try {
|
asset.Load(pFile, extension == "glb");
|
||||||
asset.Load(pFile, extension == "glb");
|
std::string version = asset.asset.version;
|
||||||
std::string version = asset.asset.version;
|
return !version.empty() && version[0] == '2';
|
||||||
return !version.empty() && version[0] == '2';
|
|
||||||
} catch (...) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue