diff options
author | Robert Haas <rhaas@postgresql.org> | 2013-06-28 09:30:38 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2013-06-28 09:33:34 -0400 |
commit | 5ee73525d57380a55b5c87f8df1c30bd32fb98b3 (patch) | |
tree | 94ed86e2f7b3c685165f032ad0f5d22db90e390f | |
parent | 9e0bc7c1e84d7fffb93130f2b7d079a0853329ed (diff) | |
download | postgresql-5ee73525d57380a55b5c87f8df1c30bd32fb98b3.tar.gz postgresql-5ee73525d57380a55b5c87f8df1c30bd32fb98b3.zip |
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
-rw-r--r-- | src/include/c.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/c.h b/src/include/c.h index f2c9e12fb34..596118342df 100644 --- a/src/include/c.h +++ b/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> |