summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2019-03-05 04:44:29 -0500
committerOz Linden <oz@lindenlab.com>2019-03-05 04:44:29 -0500
commite86c0b3d0fbc5f91090241be959ef19bfffd8636 (patch)
tree3e72f1f8f54facf84fb0f748fc4239a839780a81 /indra/llcommon/llerror.cpp
parente409c0492f1b1ce63606c0b693c92cdb36dcc28b (diff)
fix error message reporting?
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r--indra/llcommon/llerror.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 77d7fe1b24..6fa9e590cb 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -719,7 +719,7 @@ namespace LLError
commonInit(user_dir, app_dir, log_to_stderr);
}
- void overrideCrashOnError(const FatalFunction& fatal_function)
+ void setFatalHandler(const FatalFunction& fatal_function)
{
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
s->mCrashFunction = fatal_function;
@@ -1306,12 +1306,12 @@ namespace LLError
return ;
}
- bool Log::flush(std::ostringstream* out, const CallSite& site)
+ ErrCrashHandlerResult Log::flush(std::ostringstream* out, const CallSite& site)
{
LLMutexTrylock lock(&gLogMutex,5);
if (!lock.isLocked())
{
- return false; // because this wasn't logged, it cannot be fatal
+ return ERR_DO_NOT_CRASH; // because this wasn't logged, it cannot be fatal
}
// If we hit a logging request very late during shutdown processing,
@@ -1319,7 +1319,7 @@ namespace LLError
// DO NOT resurrect them.
if (Settings::wasDeleted() || Globals::wasDeleted())
{
- return false; // because this wasn't logged, it cannot be fatal
+ return ERR_DO_NOT_CRASH; // because this wasn't logged, it cannot be fatal
}
Globals* g = Globals::getInstance();
@@ -1353,7 +1353,7 @@ namespace LLError
}
else
{
- return false; // because this wasn't logged, it cannot be fatal
+ return ERR_DO_NOT_CRASH; // because this wasn't logged, it cannot be fatal
}
}
else
@@ -1369,20 +1369,18 @@ namespace LLError
if (site.mLevel == LEVEL_ERROR)
{
- g->mFatalMessage = message;
if (s->mCrashFunction)
{
- s->mCrashFunction(message);
- return false; // because an override is in effect
+ return s->mCrashFunction(message);
}
else
{
- return true; // calling macro should crash
+ return ERR_CRASH; // calling macro should crash
}
}
else
{
- return false; // not ERROR, so do not crash
+ return ERR_DO_NOT_CRASH; // not ERROR, so do not crash
}
}
}