diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2016-09-01 19:44:38 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2016-09-01 19:44:38 -0400 |
| commit | 96467f09f2ef9eba9c8e1d721349d9cc8f3e1bbb (patch) | |
| tree | 97528c1d3129feaa152aa6c8d589b4ca9e8005f9 /indra/llcommon/llcoros.cpp | |
| parent | 9be4e7e448769cb82dc7d82e93bee4f1cd2b3e6c (diff) | |
| parent | 7203162071163108cbbb18f90ddb7f5d6734f8bd (diff) | |
Automated merge with file:///Users/nat/linden/viewer-comment-lllog
Diffstat (limited to 'indra/llcommon/llcoros.cpp')
| -rw-r--r-- | indra/llcommon/llcoros.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index d16bf0160b..4db63937aa 100644 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -38,6 +38,7 @@ #include "llevents.h" #include "llerror.h" #include "stringize.h" +#include "llexception.h" // do nothing, when we need nothing done void LLCoros::no_cleanup(CoroData*) {} @@ -235,7 +236,23 @@ void LLCoros::toplevel(coro::self& self, CoroData* data, const callable_t& calla // capture the 'self' param in CoroData data->mSelf = &self; // run the code the caller actually wants in the coroutine - callable(); + try + { + callable(); + } + catch (const LLContinueError&) + { + // Any uncaught exception derived from LLContinueError will be caught + // here and logged. This coroutine will terminate but the rest of the + // viewer will carry on. + LOG_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << data->mName)); + } + catch (...) + { + // Any OTHER kind of uncaught exception will cause the viewer to + // crash, hopefully informatively. + CRASH_ON_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << data->mName)); + } // This cleanup isn't perfectly symmetrical with the way we initially set // data->mPrev, but this is our last chance to reset mCurrentCoro. sCurrentCoro.reset(data->mPrev); |
