aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llapp.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/linden/indra/llcommon/llapp.cpp b/linden/indra/llcommon/llapp.cpp
index a10436a..bd2e377 100644
--- a/linden/indra/llcommon/llapp.cpp
+++ b/linden/indra/llcommon/llapp.cpp
@@ -65,6 +65,7 @@ BOOL LLApp::sLogInSignal = FALSE;
65// static 65// static
66LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status 66LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status
67LLAppErrorHandler LLApp::sErrorHandler = NULL; 67LLAppErrorHandler LLApp::sErrorHandler = NULL;
68LLAppErrorHandler LLApp::sSyncErrorHandler = NULL;
68BOOL LLApp::sErrorThreadRunning = FALSE; 69BOOL LLApp::sErrorThreadRunning = FALSE;
69#if !LL_WINDOWS 70#if !LL_WINDOWS
70LLApp::child_map LLApp::sChildMap; 71LLApp::child_map LLApp::sChildMap;
@@ -262,6 +263,21 @@ void LLApp::setErrorHandler(LLAppErrorHandler handler)
262 LLApp::sErrorHandler = handler; 263 LLApp::sErrorHandler = handler;
263} 264}
264 265
266
267void LLApp::setSyncErrorHandler(LLAppErrorHandler handler)
268{
269 LLApp::sSyncErrorHandler = handler;
270}
271
272// static
273void LLApp::runSyncErrorHandler()
274{
275 if (LLApp::sSyncErrorHandler)
276 {
277 LLApp::sSyncErrorHandler();
278 }
279}
280
265// static 281// static
266void LLApp::runErrorHandler() 282void LLApp::runErrorHandler()
267{ 283{
@@ -285,7 +301,13 @@ void LLApp::setStatus(EAppStatus status)
285// static 301// static
286void LLApp::setError() 302void LLApp::setError()
287{ 303{
288 setStatus(APP_STATUS_ERROR); 304 if (!isError())
305 {
306 // perform any needed synchronous error-handling
307 runSyncErrorHandler();
308 // set app status to ERROR so that the LLErrorThread notices
309 setStatus(APP_STATUS_ERROR);
310 }
289} 311}
290 312
291 313