summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2019-03-05 13:57:02 -0500
committerOz Linden <oz@lindenlab.com>2019-03-05 13:57:02 -0500
commit07870a9ebb17e7a31df276f4ac2d8f52fec2a3b0 (patch)
tree44d347784baca004016feb5a7d88df51ff9f0eef /indra/llcommon/llerror.cpp
parente86c0b3d0fbc5f91090241be959ef19bfffd8636 (diff)
rename crash handler to hook, and make them chainable by putting back the get and documenting it
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r--indra/llcommon/llerror.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 6fa9e590cb..5f3edf7f84 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -483,7 +483,7 @@ namespace LLError
LevelMap mTagLevelMap;
std::map<std::string, unsigned int> mUniqueLogMessages;
- LLError::FatalFunction mCrashFunction;
+ LLError::FatalHook mFatalHook;
LLError::TimeFunction mTimeFunction;
Recorders mRecorders;
@@ -523,7 +523,7 @@ namespace LLError
mFileLevelMap(),
mTagLevelMap(),
mUniqueLogMessages(),
- mCrashFunction(NULL),
+ mFatalHook(NULL),
mTimeFunction(NULL),
mRecorders(),
mFileRecorder(),
@@ -719,16 +719,16 @@ namespace LLError
commonInit(user_dir, app_dir, log_to_stderr);
}
- void setFatalHandler(const FatalFunction& fatal_function)
+ void setFatalHook(const FatalHook& fatal_hook)
{
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
- s->mCrashFunction = fatal_function;
+ s->mFatalHook = fatal_hook;
}
- void restoreCrashOnError()
+ FatalHook getFatalHook()
{
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
- s->mCrashFunction = NULL;
+ return s->mFatalHook;
}
std::string getFatalMessage()
@@ -1306,7 +1306,7 @@ namespace LLError
return ;
}
- ErrCrashHandlerResult Log::flush(std::ostringstream* out, const CallSite& site)
+ ErrFatalHookResult Log::flush(std::ostringstream* out, const CallSite& site)
{
LLMutexTrylock lock(&gLogMutex,5);
if (!lock.isLocked())
@@ -1369,9 +1369,9 @@ namespace LLError
if (site.mLevel == LEVEL_ERROR)
{
- if (s->mCrashFunction)
+ if (s->mFatalHook)
{
- return s->mCrashFunction(message);
+ return s->mFatalHook(message);
}
else
{