Browse files

Define Trap and TrapMacro even in non-cassert builds.

In some cases, the use of these macros may be preferable to Assert()
or AssertMacro(), since this way the caller can set the trap message.

Andres Freund and Robert Haas
  • Loading branch information...
Robert Haas
Robert Haas committed Jun 28, 2013
1 parent 9e0bc7c commit 5ee73525d57380a55b5c87f8df1c30bd32fb98b3
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/include/c.h
@@ -573,6 +573,9 @@ typedef NameData *Name;
#define AssertMacro(condition) ((void)true)
#define AssertArg(condition)
#define AssertState(condition)
+#define Trap(condition, errorType)
+#define TrapMacro(condition, errorType) (true)
#elif defined(FRONTEND)
#include <assert.h>

0 comments on commit 5ee7352

Please sign in to comment.