From 138a3363846abe27bab7838978235f7860b5a52b Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 19 Jan 2014 17:54:31 +0100 Subject: [PATCH] CoreCore/CrashHandler: Handle CRT asserts in Windows build Handle CRT asserts in Windows crash handler instead of popping up a Abort/Retry/Ignore window --- src/server/shared/Debugging/WheatyExceptionReport.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp index 33f1492bb7..b4d57f065b 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); + } } //============