Replaced std::exit with a crash.

This commit is contained in:
Daviw Williams 2013-03-27 15:21:38 +01:00
parent 5cab70b24c
commit 1d643becc5

View File

@ -31,9 +31,12 @@ freely, subject to the following restrictions:
#include <stdexcept>
#if defined(_MSC_VER)
// In Visual Studio we can use this function to go into the debugger.
#define POLYVOX_HALT() __debugbreak()
#else
#define POLYVOX_HALT() std::exit(EXIT_FAILURE)
// On other platforms we just halt by forcing a crash.
// Hopefully this puts us in the debugger if one is running
#define POLYVOX_HALT() *((unsigned int*)0) = 0xDEAD
#endif
// Macros cannot contain #ifdefs, but some of our macros need to disable warnings and such warning supression is