1 /*-------------------------------------------------------------------------
6 * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
11 * $PostgreSQL: pgsql/src/backend/utils/error/assert.c,v 1.29 2004/08/29 05:06:50 momjian Exp $
14 * This should eventually work with elog()
16 *-------------------------------------------------------------------------
23 * ExceptionalCondition - Handles the failure of an Assert()
26 ExceptionalCondition(char *conditionName,
31 if (!PointerIsValid(conditionName)
32 || !PointerIsValid(fileName)
33 || !PointerIsValid(errorType))
34 write_stderr("TRAP: ExceptionalCondition: bad arguments\n");
37 write_stderr("TRAP: %s(\"%s\", File: \"%s\", Line: %d)\n",
38 errorType, conditionName,
39 fileName, lineNumber);
42 #ifdef SLEEP_ON_ASSERT
45 * It would be nice to use pg_usleep() here, but only does 2000 sec or
46 * 33 minutes, which seems too short.