Call DebugBreak on assertion failure
This commit is contained in:
parent
1e05a91f99
commit
f2d1a283bc
|
@ -352,9 +352,14 @@ TORRENT_EXPORT void assert_fail(char const* expr, int line
|
||||||
|
|
||||||
// if production asserts are defined, don't abort, just print the error
|
// if production asserts are defined, don't abort, just print the error
|
||||||
#ifndef TORRENT_PRODUCTION_ASSERTS
|
#ifndef TORRENT_PRODUCTION_ASSERTS
|
||||||
|
#ifdef TORRENT_WINDOWS
|
||||||
|
// SIGINT doesn't trigger a break with msvc
|
||||||
|
DebugBreak();
|
||||||
|
#else
|
||||||
// send SIGINT to the current process
|
// send SIGINT to the current process
|
||||||
// to break into the debugger
|
// to break into the debugger
|
||||||
raise(SIGINT);
|
raise(SIGINT);
|
||||||
|
#endif
|
||||||
abort();
|
abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue