Browse Source

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.
v0.11.4-release
Ben Noordhuis 11 years ago
parent
commit
c56a96c25c
  1. 4
      src/node.cc

4
src/node.cc

@ -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);
}

Loading…
Cancel
Save