diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h b/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h index 70778808..4b4ee263 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h @@ -31,9 +31,12 @@ freely, subject to the following restrictions: #include #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