diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-07-01 23:14:24 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-07-02 01:40:50 +0300 |
commit | 76dd9385f9354fd661d1c7cc1e7c3d9c39355675 (patch) | |
tree | 77b908736edee8de042b5ea9269cf9a1de09f5af /indra/newview/gltf | |
parent | 230a8caa5d839f2f987814d8fb8d94594cddf7f8 (diff) |
#4315 Crash in GLTF uploader
Properly handle importer's crashes in general
Diffstat (limited to 'indra/newview/gltf')
-rw-r--r-- | indra/newview/gltf/llgltfloader.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp index 71bfc021d3..bb6a0a590c 100644 --- a/indra/newview/gltf/llgltfloader.cpp +++ b/indra/newview/gltf/llgltfloader.cpp @@ -124,7 +124,32 @@ bool LLGLTFLoader::OpenFile(const std::string &filename) std::string filename_lc(filename); LLStringUtil::toLower(filename_lc); - mGltfLoaded = mGLTFAsset.load(filename, false); + try + { + mGltfLoaded = mGLTFAsset.load(filename, false); + } + catch (const std::exception& e) + { + LL_WARNS() << "Exception in LLModelLoader::run: " << e.what() << LL_ENDL; + LLSD args; + args["Message"] = "ParsingErrorException"; + args["FILENAME"] = filename; + args["EXCEPTION"] = e.what(); + mWarningsArray.append(args); + setLoadState(ERROR_PARSING); + return false; + } + catch (...) + { + LOG_UNHANDLED_EXCEPTION("LLGLTFLoader"); + LLSD args; + args["Message"] = "ParsingErrorException"; + args["FILENAME"] = filename; + args["EXCEPTION"] = "Unknown exception"; + mWarningsArray.append(args); + setLoadState(ERROR_PARSING); + return false; + } if (!mGltfLoaded) { |