postgres.git / summary / log / commit / refs

commit    5ee73525d57380a55b5c87f8df1c30bd32fb98b3
Author:   Robert Haas <rhaas@postgresql.org>
Date:     Fri Jun 28 13:30:38 2013 +0000
First released in: 9.4.0

    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


src/include/c.h | 3 +++ 1 file changed, 3 insertions(+) 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> [parent: 9e0bc7c1e84d]