summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-11-29 23:06:10 +0100
committerMattes D <github@xoft.cz>2014-11-29 23:06:10 +0100
commit201313a9f84192ad7f2fcd7e4ab2cc793a85b96f (patch)
treedacc0cc4d1d81cda9c4c9c8bf8fc1fff0dff2f13 /src/Globals.h
parentMerge pull request #1619 from mc-server/WarningFixes (diff)
downloadcuberite-201313a9f84192ad7f2fcd7e4ab2cc793a85b96f.tar
cuberite-201313a9f84192ad7f2fcd7e4ab2cc793a85b96f.tar.gz
cuberite-201313a9f84192ad7f2fcd7e4ab2cc793a85b96f.tar.bz2
cuberite-201313a9f84192ad7f2fcd7e4ab2cc793a85b96f.tar.lz
cuberite-201313a9f84192ad7f2fcd7e4ab2cc793a85b96f.tar.xz
cuberite-201313a9f84192ad7f2fcd7e4ab2cc793a85b96f.tar.zst
cuberite-201313a9f84192ad7f2fcd7e4ab2cc793a85b96f.zip
Diffstat (limited to '')
-rw-r--r--src/Globals.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Globals.h b/src/Globals.h
index 582f5fdaa..d75ae0093 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -264,6 +264,7 @@ template class SizeChecker<UInt16, 2>;
#include "OSSupport/Thread.h"
#include "OSSupport/File.h"
#include "Logger.h"
+ #include "OSSupport/StackTrace.h"
#else
// Logging functions
void inline LOGERROR(const char* a_Format, ...) FORMATSTRING(1, 2);
@@ -349,14 +350,14 @@ void inline LOGD(const char* a_Format, ...)
#else
#ifdef _DEBUG
- #define ASSERT( x) ( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__), assert(0), 0))
+ #define ASSERT( x) ( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__), PrintStackTrace(), assert(0), 0))
#else
#define ASSERT(x) ((void)(x))
#endif
#endif
// Pretty much the same as ASSERT() but stays in Release builds
-#define VERIFY( x) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), exit(1), 0))
+#define VERIFY( x) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), PrintStackTrace(), exit(1), 0))
// Same as assert but in all Self test builds
#ifdef SELF_TEST