From c57beb8b4bd51add9a92ddc4d704e7bea9c4d940 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 17 Apr 2008 02:06:30 +0000 Subject: QAR-449 Viewer 1.20 RC 0 merge Branch_1-20-Viewer -r 84060 : 84432 -> release --- indra/llcommon/llapp.cpp | 24 +++++++++++++++++++++++- indra/llcommon/llapp.h | 5 ++++- indra/llcommon/llversionviewer.h | 6 +++--- 3 files changed, 30 insertions(+), 5 deletions(-) (limited to 'indra/llcommon') 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); + } } diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index c199601c20..c5a1546883 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -190,6 +190,7 @@ public: // Error handling methods // void setErrorHandler(LLAppErrorHandler handler); + void setSyncErrorHandler(LLAppErrorHandler handler); #if !LL_WINDOWS // @@ -246,13 +247,15 @@ protected: private: void setupErrorHandling(); // Do platform-specific error-handling setup (signals, structured exceptions) - static void runErrorHandler(); + static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred. + static void runSyncErrorHandler(); // run IMMEDIATELY when we get an error, ran in the context of the faulting thread. // *NOTE: On Windows, we need a routine to reset the structured // exception handler when some evil driver has taken it over for // their own purposes typedef int(*signal_handler_func)(int signum); static LLAppErrorHandler sErrorHandler; + static LLAppErrorHandler sSyncErrorHandler; // Default application threads LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 8e964d3891..c586acc7d9 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -33,9 +33,9 @@ #define LL_LLVERSIONVIEWER_H const S32 LL_VERSION_MAJOR = 1; -const S32 LL_VERSION_MINOR = 19; -const S32 LL_VERSION_PATCH = 1; -const S32 LL_VERSION_BUILD = 84396; +const S32 LL_VERSION_MINOR = 20; +const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Release"; -- cgit v1.2.3