diff options
author | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:17:05 +0200 |
---|---|---|
committer | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:17:05 +0200 |
commit | 0bed9d56cb9f10979492187c51042802272ce8ed (patch) | |
tree | 626a32a25a1486bf650e20518235f5ff6c7bffe0 /src/common/Debugging/Errors.h | |
parent | 32a2e584296556e852830e50cfa612ce279360b6 (diff) |
Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert
Diffstat (limited to 'src/common/Debugging/Errors.h')
-rw-r--r-- | src/common/Debugging/Errors.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h index 4d4624b63dd..024c5981c72 100644 --- a/src/common/Debugging/Errors.h +++ b/src/common/Debugging/Errors.h @@ -46,8 +46,10 @@ namespace Trinity #define WPFatal(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END #define WPError(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END #define WPWarning(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END +#define WPAbort() ASSERT_BEGIN do { Trinity::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END #define ASSERT WPAssert +#define ABORT WPAbort template <typename T> inline T* ASSERT_NOTNULL(T* pointer) { |