1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

A few fixups in error handling: mark pg_re_throw() as noreturn for gcc,

and for other compilers, insert a dummy exit() call so that they understand
PG_RE_THROW() doesn't return.  Insert fflush(stderr) in ExceptionalCondition,
per recent buildfarm evidence that that might not happen automatically on some
platforms.  And const-ify ExceptionalCondition's declaration while at it.
This commit is contained in:
Tom Lane
2007-05-04 02:01:02 +00:00
parent d26559dbf3
commit 79ca7ffeb6
4 changed files with 36 additions and 10 deletions

View File

@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1995, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/postgres.h,v 1.79 2007/04/06 04:21:44 tgl Exp $
* $PostgreSQL: pgsql/src/include/postgres.h,v 1.80 2007/05/04 02:01:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -694,8 +694,9 @@ extern DLLIMPORT bool assert_enabled;
Trap(!(condition), "BadState")
#endif /* USE_ASSERT_CHECKING */
extern int ExceptionalCondition(char *conditionName, char *errorType,
char *fileName, int lineNumber);
extern int ExceptionalCondition(const char *conditionName,
const char *errorType,
const char *fileName, int lineNumber);
/* ----------------------------------------------------------------
* Section 4: genbki macros used by catalog/pg_xxx.h files