summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-06-19 15:47:57 -0400
committerGeenz <geenz@geenzo.com>2013-06-19 15:47:57 -0400
commit9c83d4b5b88a927c4365154663b1809a450ccb98 (patch)
treed59d9d5c0e42058e09d73f4ca1c04f47ee55db6c /indra/llcommon/llerror.cpp
parent72159fd03ea02422e3c6acfbed9221a5326a9cc0 (diff)
parent2655c7a17ae38a073dcf8f05b0127b68edc34c95 (diff)
Merge with viewer-release.
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rwxr-xr-xindra/llcommon/llerror.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 9b0141eb76..d2af004cde 100755
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -201,10 +201,7 @@ namespace {
virtual void recordMessage(LLError::ELevel level,
const std::string& message)
{
- llutf16string utf16str =
- wstring_to_utf16str(utf8str_to_wstring(message));
- utf16str += '\n';
- OutputDebugString(utf16str.c_str());
+ LL_WINDOWS_OUTPUT_DEBUG(message);
}
};
#endif
@@ -1401,5 +1398,27 @@ namespace LLError
{
sIndex = 0 ;
}
+
+#if LL_WINDOWS
+ void LLOutputDebugUTF8(const std::string& s)
+ {
+ // Be careful when calling OutputDebugString as it throws DBG_PRINTEXCEPTION_C
+ // which works just fine under the windows debugger, but can cause users who
+ // have enabled SEHOP exception chain validation to crash due to interactions
+ // between the Win 32-bit exception handling and boost coroutine fiber stacks. BUG-2707
+ //
+ if (IsDebuggerPresent())
+ {
+ // Need UTF16 for Unicode OutputDebugString
+ //
+ if (s.size())
+ {
+ OutputDebugString(utf8str_to_utf16str(s).c_str());
+ OutputDebugString(TEXT("\n"));
+ }
+ }
+ }
+#endif
+
}