Commit 5ee73525 authored by Robert Haas's avatar Robert Haas

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
parent 9e0bc7c1
...@@ -573,6 +573,9 @@ typedef NameData *Name; ...@@ -573,6 +573,9 @@ typedef NameData *Name;
#define AssertMacro(condition) ((void)true) #define AssertMacro(condition) ((void)true)
#define AssertArg(condition) #define AssertArg(condition)
#define AssertState(condition) #define AssertState(condition)
#define Trap(condition, errorType)
#define TrapMacro(condition, errorType) (true)
#elif defined(FRONTEND) #elif defined(FRONTEND)
#include <assert.h> #include <assert.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment