ソースを参照

Remove try catch(...) on gltf2 importer

Better to throw exception than hide it ?
Alexandre Avenel 7 年 前
コミット
3c37fbdc6b
1 ファイル変更3 行追加7 行削除
  1. 3 7
      code/glTF2Importer.cpp

+ 3 - 7
code/glTF2Importer.cpp

@@ -117,13 +117,9 @@ bool glTF2Importer::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool
 
     if (pIOHandler) {
         glTF2::Asset asset(pIOHandler);
-        try {
-            asset.Load(pFile, extension == "glb");
-            std::string version = asset.asset.version;
-            return !version.empty() && version[0] == '2';
-        } catch (...) {
-            return false;
-        }
+        asset.Load(pFile, extension == "glb");
+        std::string version = asset.asset.version;
+        return !version.empty() && version[0] == '2';
     }
 
     return false;