diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/llapp.cpp | 24 |
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 |
66 | LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status | 66 | LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status |
67 | LLAppErrorHandler LLApp::sErrorHandler = NULL; | 67 | LLAppErrorHandler LLApp::sErrorHandler = NULL; |
68 | LLAppErrorHandler LLApp::sSyncErrorHandler = NULL; | ||
68 | BOOL LLApp::sErrorThreadRunning = FALSE; | 69 | BOOL LLApp::sErrorThreadRunning = FALSE; |
69 | #if !LL_WINDOWS | 70 | #if !LL_WINDOWS |
70 | LLApp::child_map LLApp::sChildMap; | 71 | LLApp::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 | |||
267 | void LLApp::setSyncErrorHandler(LLAppErrorHandler handler) | ||
268 | { | ||
269 | LLApp::sSyncErrorHandler = handler; | ||
270 | } | ||
271 | |||
272 | // static | ||
273 | void LLApp::runSyncErrorHandler() | ||
274 | { | ||
275 | if (LLApp::sSyncErrorHandler) | ||
276 | { | ||
277 | LLApp::sSyncErrorHandler(); | ||
278 | } | ||
279 | } | ||
280 | |||
265 | // static | 281 | // static |
266 | void LLApp::runErrorHandler() | 282 | void LLApp::runErrorHandler() |
267 | { | 283 | { |
@@ -285,7 +301,13 @@ void LLApp::setStatus(EAppStatus status) | |||
285 | // static | 301 | // static |
286 | void LLApp::setError() | 302 | void 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 | ||