mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
This patch removes a lot of unused code related to assertions and
error handling, and simplifies the code that remains. Apparently, the code that left Berkeley had a whole "error handling subsystem", which exceptions and whatnot. Since we don't use that anymore, there's no reason to keep it around. The regression tests pass with the patch applied. Unless anyone sees a problem, please apply. Neil Conway
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/ipc_test.c,v 1.3 2002/06/20 20:29:33 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/ipc_test.c,v 1.4 2002/08/10 20:29:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "storage/ipc.h"
|
||||
#include "storage/pg_sema.h"
|
||||
#include "storage/pg_shmem.h"
|
||||
#include "utils/exc.h"
|
||||
|
||||
|
||||
/********* stuff needed to satisfy references in shmem/sema code *********/
|
||||
@@ -56,8 +55,6 @@ int NBuffers = DEF_NBUFFERS;
|
||||
bool assert_enabled = true;
|
||||
#endif
|
||||
|
||||
Exception FailedAssertion = {"Failed Assertion"};
|
||||
|
||||
|
||||
#define MAX_ON_EXITS 20
|
||||
|
||||
@@ -120,14 +117,12 @@ ProcessInterrupts(void)
|
||||
|
||||
int
|
||||
ExceptionalCondition(char *conditionName,
|
||||
Exception *exceptionP,
|
||||
char *detail,
|
||||
char *errorType,
|
||||
char *fileName,
|
||||
int lineNumber)
|
||||
{
|
||||
fprintf(stderr, "TRAP: %s(\"%s:%s\", File: \"%s\", Line: %d)\n",
|
||||
exceptionP->message, conditionName,
|
||||
(detail == NULL ? "" : detail),
|
||||
fprintf(stderr, "TRAP: %s(\"%s\", File: \"%s\", Line: %d)\n",
|
||||
errorType, conditionName,
|
||||
fileName, lineNumber);
|
||||
abort();
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user