summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r--indra/llcommon/llerror.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index f31a054139..b5e7e81f21 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -377,6 +377,7 @@ namespace
public:
std::ostringstream messageStream;
bool messageStreamInUse;
+ std::string mFatalMessage;
void addCallSite(LLError::CallSite&);
void invalidateCallSites();
@@ -670,11 +671,16 @@ namespace LLError
s->mCrashFunction = f;
}
- FatalFunction getFatalFunction()
- {
+ FatalFunction getFatalFunction()
+ {
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
- return s->mCrashFunction;
- }
+ return s->mCrashFunction;
+ }
+
+ std::string getFatalMessage()
+ {
+ return Globals::getInstance()->mFatalMessage;
+ }
void setTimeFunction(TimeFunction f)
{
@@ -1194,7 +1200,7 @@ namespace LLError
{
writeToRecorders(site, "error", true, true, true, false, false);
}
-
+
std::ostringstream message_stream;
if (site.mPrintOnce)
@@ -1219,14 +1225,19 @@ namespace LLError
s->mUniqueLogMessages[message] = 1;
}
}
-
+
message_stream << message;
-
- writeToRecorders(site, message_stream.str());
-
- if (site.mLevel == LEVEL_ERROR && s->mCrashFunction)
+ std::string message_line(message_stream.str());
+
+ writeToRecorders(site, message_line);
+
+ if (site.mLevel == LEVEL_ERROR)
{
- s->mCrashFunction(message_stream.str());
+ g->mFatalMessage = message_line;
+ if (s->mCrashFunction)
+ {
+ s->mCrashFunction(message_line);
+ }
}
}
}