diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-04-17 02:42:27 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-04-17 02:42:27 +0000 |
commit | d85247e63e5ff0b488211b62429a4895b48dee27 (patch) | |
tree | 0aa2f02aeef6a8133e0d037e95ad5089b20df9eb /indra/llcommon/llapp.cpp | |
parent | d2597d35cf3aeaf0c47a134dfe9119ef7932b98a (diff) |
QAR-449 Viewer 1.20 RC 0
merge Branch_1-20-Viewer -r 84060 : 84432 -> release
Diffstat (limited to 'indra/llcommon/llapp.cpp')
-rw-r--r-- | indra/llcommon/llapp.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 067dc4fc43..d034334aab 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -78,6 +78,7 @@ BOOL LLApp::sLogInSignal = FALSE; // static LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status LLAppErrorHandler LLApp::sErrorHandler = NULL; +LLAppErrorHandler LLApp::sSyncErrorHandler = NULL; BOOL LLApp::sErrorThreadRunning = FALSE; #if !LL_WINDOWS LLApp::child_map LLApp::sChildMap; @@ -275,6 +276,21 @@ void LLApp::setErrorHandler(LLAppErrorHandler handler) LLApp::sErrorHandler = handler; } + +void LLApp::setSyncErrorHandler(LLAppErrorHandler handler) +{ + LLApp::sSyncErrorHandler = handler; +} + +// static +void LLApp::runSyncErrorHandler() +{ + if (LLApp::sSyncErrorHandler) + { + LLApp::sSyncErrorHandler(); + } +} + // static void LLApp::runErrorHandler() { @@ -298,7 +314,13 @@ void LLApp::setStatus(EAppStatus status) // static void LLApp::setError() { - setStatus(APP_STATUS_ERROR); + if (!isError()) + { + // perform any needed synchronous error-handling + runSyncErrorHandler(); + // set app status to ERROR so that the LLErrorThread notices + setStatus(APP_STATUS_ERROR); + } } |