src: abort() on fatal error in debug mode

abort() generates a nice core dump and makes it easy to catch fatal
errors in one's debugger of choice.
This commit is contained in:
Ben Noordhuis 2013-06-29 07:30:11 +02:00
parent 8985bb8bfd
commit c56a96c25c

View File

@ -1852,6 +1852,10 @@ static void OnFatalError(const char* location, const char* message) {
} else {
fprintf(stderr, "FATAL ERROR: %s\n", message);
}
fflush(stderr);
#if defined(DEBUG)
abort();
#endif
exit(5);
}