summaryrefslogtreecommitdiff
path: root/src/utilcode
diff options
context:
space:
mode:
Diffstat (limited to 'src/utilcode')
-rw-r--r--src/utilcode/debug.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/utilcode/debug.cpp b/src/utilcode/debug.cpp
index 3d8704826b..a19e7a4f63 100644
--- a/src/utilcode/debug.cpp
+++ b/src/utilcode/debug.cpp
@@ -180,7 +180,7 @@ VOID TerminateOnAssert()
STATIC_CONTRACT_DEBUG_ONLY;
ShutdownLogging();
- TerminateProcess(GetCurrentProcess(), 123456789);
+ RaiseFailFastException(NULL, NULL, 0);
}
// Whether this thread is already displaying an assert dialog.
@@ -431,14 +431,14 @@ bool _DbgBreakCheck(
return false; // don't stop debugger. No gui.
}
- if (NoGuiOnAssert())
+ if (IsDebuggerPresent() || DebugBreakOnAssert())
{
- TerminateOnAssert();
+ return true; // like a retry
}
- if (DebugBreakOnAssert())
+ if (NoGuiOnAssert())
{
- return true; // like a retry
+ TerminateOnAssert();
}
if (IsDisplayingAssertDlg())
@@ -870,12 +870,9 @@ void DECLSPEC_NORETURN __FreeBuildAssertFail(const char *szFile, int iLine, cons
_flushall();
- // TerminateOnAssert();
ShutdownLogging();
- // Failing here implies an error in the runtime - hence we use
- // COR_E_EXECUTIONENGINE
- TerminateProcess(GetCurrentProcess(), COR_E_EXECUTIONENGINE);
+ RaiseFailFastException(NULL, NULL, 0);
UNREACHABLE();
}