diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-07-19 10:12:45 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-07-19 20:47:47 +0300 |
commit | 4b69fe396fc0bb783c7db203fd327c16a30f6c5e (patch) | |
tree | f2ad186358602e67d6651c8267599b3a94f351ad | |
parent | f5d350fb7bd51735ab2624262e841d614c6eadd8 (diff) |
#4320 MacOS crash handling
-rw-r--r-- | indra/llcommon/workqueue.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 3 |
2 files changed, 18 insertions, 9 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp index c8ece616b2..ea4feec58c 100644 --- a/indra/llcommon/workqueue.cpp +++ b/indra/llcommon/workqueue.cpp @@ -182,14 +182,22 @@ void LL::WorkQueueBase::callWork(const Work& work) } catch (...) { - // Stash any other kind of uncaught exception to be rethrown by main thread. - LL_WARNS("LLCoros") << "Capturing and rethrowing uncaught exception in WorkQueueBase " - << getKey() << LL_ENDL; - - LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop"); - main_queue->post( - // Bind the current exception, rethrow it in main loop. - [exc = std::current_exception()]() { std::rethrow_exception(exc); }); + if (getKey() != "mainloop") + { + // Stash any other kind of uncaught exception to be rethrown by main thread. + LL_WARNS("LLCoros") << "Capturing and rethrowing uncaught exception in WorkQueueBase " + << getKey() << LL_ENDL; + + LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop"); + main_queue->post( + // Bind the current exception, rethrow it in main loop. + [exc = std::current_exception()]() { std::rethrow_exception(exc); }); + } + else + { + // let main loop crash + throw; + } } #endif // else LL_WINDOWS } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f4b2fdfdf7..35fdc18839 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5696,7 +5696,8 @@ void LLAppViewer::forceExceptionThreadCrash() void run() { - throw std::exception(); + const std::string exception_text = "This is a deliberate exception in a thread"; + throw std::runtime_error(exception_text); } }; |