aboutsummaryrefslogtreecommitdiff
path: root/src/common/Debugging/Errors.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Debugging/Errors.h')
-rw-r--r--src/common/Debugging/Errors.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h
index 428e7653db2..d263be3efed 100644
--- a/src/common/Debugging/Errors.h
+++ b/src/common/Debugging/Errors.h
@@ -70,10 +70,13 @@ TC_COMMON_API std::string GetDebugInfo();
#define ABORT WPAbort
-template <typename T> inline T* ASSERT_NOTNULL(T* pointer)
+template <typename T>
+inline T* ASSERT_NOTNULL_IMPL(T* pointer, char const* expr)
{
- ASSERT(pointer);
+ ASSERT(pointer, "%s", expr);
return pointer;
}
+#define ASSERT_NOTNULL(pointer) ASSERT_NOTNULL_IMPL(pointer, #pointer)
+
#endif