Skip to content

Commit 5ee7352

Browse files
committed
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
1 parent 9e0bc7c commit 5ee7352

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/include/c.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@ typedef NameData *Name;
573573
#define AssertMacro(condition) ((void)true)
574574
#define AssertArg(condition)
575575
#define AssertState(condition)
576+
#define Trap(condition, errorType)
577+
#define TrapMacro(condition, errorType) (true)
578+
576579
#elif defined(FRONTEND)
577580

578581
#include <assert.h>

0 commit comments

Comments
 (0)