#include "postgres.h"
#include <unistd.h>
Go to the source code of this file.
◆ ExceptionalCondition()
| void ExceptionalCondition |
( |
const char * |
conditionName, |
|
|
const char * |
fileName, |
|
|
int |
lineNumber |
|
) |
| |
Definition at line 30 of file assert.c.
33{
34
35 if (!conditionName || !fileName)
36 write_stderr(
"TRAP: ExceptionalCondition: bad arguments in PID %d\n",
37 (int) getpid());
38 else
39 write_stderr(
"TRAP: failed Assert(\"%s\"), File: \"%s\", Line: %d, PID: %d\n",
40 conditionName, fileName, lineNumber, (int) getpid());
41
42
43 fflush(stderr);
44
45
46#ifdef HAVE_BACKTRACE_SYMBOLS
47 {
49 int nframes;
50
52 backtrace_symbols_fd(
buf, nframes, fileno(stderr));
53 }
54#endif
55
56
57
58
59
60
61#ifdef SLEEP_ON_ASSERT
62 sleep(1000000);
63#endif
64
65 abort();
66}
#define write_stderr(str)
References buf, lengthof, and write_stderr.
Referenced by pg_re_throw().