mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 19:54:13 +08:00
mdbx-windows: always call debugger if it present when assertion check failed.
This commit is contained in:
parent
beda291692
commit
f51ace3db8
@ -242,14 +242,14 @@ __cold void mdbx_assert_fail(const MDBX_env *env, const char *msg,
|
|||||||
if (num < 1 || !message)
|
if (num < 1 || !message)
|
||||||
message = "<troubles with assertion-message preparation>";
|
message = "<troubles with assertion-message preparation>";
|
||||||
OutputDebugStringA(message);
|
OutputDebugStringA(message);
|
||||||
if (IsDebuggerPresent())
|
|
||||||
DebugBreak();
|
|
||||||
#else
|
#else
|
||||||
__assert_fail(msg, "mdbx", line, func);
|
__assert_fail(msg, "mdbx", line, func);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
if (IsDebuggerPresent())
|
||||||
|
DebugBreak();
|
||||||
FatalExit(ERROR_UNHANDLED_ERROR);
|
FatalExit(ERROR_UNHANDLED_ERROR);
|
||||||
#else
|
#else
|
||||||
abort();
|
abort();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user