diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-07-03 21:26:14 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-07-03 21:26:14 +0800 |
commit | 2df6ca5bc3e7931fcdddc57618a6d08547ba411b (patch) | |
tree | a126ef5814878704d137aa81c2851414e5d27a40 /indra/llprimitive | |
parent | 9dee269eacd32c48627d3fcc243104a56f021bbc (diff) | |
parent | 900516a449c618c87517d295db7f76662e555d00 (diff) |
Merge tag 'Second_Life_Project#900516a4-glTF_Mesh_Import' into gltf_mesh_import
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/llmodelloader.cpp | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp index 55f1338dab..7fc4aa2bdf 100644 --- a/indra/llprimitive/llmodelloader.cpp +++ b/indra/llprimitive/llmodelloader.cpp @@ -149,7 +149,42 @@ LLModelLoader::~LLModelLoader() void LLModelLoader::run() { mWarningsArray.clear(); - doLoadModel(); + try + { + doLoadModel(); + } + // Model loader isn't mission critical, so we just log all exceptions + catch (const LLException& e) + { + LL_WARNS("THREAD") << "LLException in model loader: " << e.what() << "" << LL_ENDL; + LLSD args; + args["Message"] = "UnknownException"; + args["FILENAME"] = mFilename; + args["EXCEPTION"] = e.what(); + mWarningsArray.append(args); + setLoadState(ERROR_PARSING); + } + catch (const std::exception& e) + { + LL_WARNS() << "Exception in LLModelLoader::run: " << e.what() << LL_ENDL; + LLSD args; + args["Message"] = "UnknownException"; + args["FILENAME"] = mFilename; + args["EXCEPTION"] = e.what(); + mWarningsArray.append(args); + setLoadState(ERROR_PARSING); + } + catch (...) + { + LOG_UNHANDLED_EXCEPTION("LLModelLoader"); + LLSD args; + args["Message"] = "UnknownException"; + args["FILENAME"] = mFilename; + args["EXCEPTION"] = "Unknown exception"; + mWarningsArray.append(args); + setLoadState(ERROR_PARSING); + } + // todo: we are inside of a thread, push this into main thread worker, // not into doOnIdleOneTime that laks tread safety doOnIdleOneTime(boost::bind(&LLModelLoader::loadModelCallback,this)); |