assertmsg() macro
authorCasper Hornstrup <chorns@users.sourceforge.net>
Fri, 15 Mar 2002 19:44:16 +0000 (19:44 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Fri, 15 Mar 2002 19:44:16 +0000 (19:44 +0000)
svn path=/trunk/; revision=2715

reactos/ntoskrnl/include/internal/debug.h

index 3effb4d..b71412b 100644 (file)
 /* Assert only on "checked" version */
 #ifndef NASSERT
 #define assert(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); KeBugCheck(0); }
+
+#define assertmsg(_c_, _m_) \
+  if (!(_c_)) { \
+      DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \
+      DbgPrint _m_ ; \
+      KeBugCheck(0); \
+  }
+
 #else
+
 #define assert(x)
+#define assertmsg(_c_, _m_)
+
 #endif
 
 /* Print if using a "checked" version */