aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Debugging
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-01-19 17:54:31 +0100
committerjackpoz <giacomopoz@gmail.com>2014-01-19 17:59:01 +0100
commit138a3363846abe27bab7838978235f7860b5a52b (patch)
tree68ea978db7bc22f463fcaeefbb61445fc2c57fee /src/server/shared/Debugging
parent3102da5263540446aa73526d998be151aa624640 (diff)
CoreCore/CrashHandler: Handle CRT asserts in Windows build
Handle CRT asserts in Windows crash handler instead of popping up a Abort/Retry/Ignore window
Diffstat (limited to 'src/server/shared/Debugging')
-rw-r--r--src/server/shared/Debugging/WheatyExceptionReport.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp
index 33f1492bb7f..b4d57f065b0 100644
--- a/src/server/shared/Debugging/WheatyExceptionReport.cpp
+++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp
@@ -62,6 +62,13 @@ WheatyExceptionReport::WheatyExceptionReport() // Constructor
// Install the unhandled exception filter function
m_previousFilter = SetUnhandledExceptionFilter(WheatyUnhandledExceptionFilter);
m_hProcess = GetCurrentProcess();
+ if (!IsDebuggerPresent())
+ {
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
+ _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+ _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
+ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
+ }
}
//============