mdbx-windows: always call debugger if it present when assertion check failed.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-09-22 17:26:59 +03:00
parent beda291692
commit f51ace3db8

View File

@ -242,14 +242,14 @@ __cold void mdbx_assert_fail(const MDBX_env *env, const char *msg,
if (num < 1 || !message)
message = "<troubles with assertion-message preparation>";
OutputDebugStringA(message);
if (IsDebuggerPresent())
DebugBreak();
#else
__assert_fail(msg, "mdbx", line, func);
#endif
}
#if defined(_WIN32) || defined(_WIN64)
if (IsDebuggerPresent())
DebugBreak();
FatalExit(ERROR_UNHANDLED_ERROR);
#else
abort();