(Re-sending just the fourth of four patches: c++exception)
These patches are based on CVS head in which the latest commit was
date: Thu Dec 04 17:51:28 2008 +0000
summary: Default values for function arguments
When C code calls C++ code, all C++ exceptions need to be caught
and fully contained within the C++ code. Exceptions should never
be thrown outward across the C/C++ frontier.
If an exception is not caught within C++ code, and the search for
a matching 'catch' bumps into a C stack frame, the result may be
platform dependent. On my platform (Linux/GCC), if this happens
in the postgres backend, the process terminates silently as if
abort() had been called.
With this patch, if --enable-cplusplus is configured,
PostgresMain defines a handler to intercept any uncaught C++
exception and convert it to a conventional PostgreSQL error of
FATAL severity. This allows the backend to clean up and report
the error before terminating.
In response to
pgsql-hackers by date
|Next:||From: Greg Smith||Date: 2008-12-05 09:24:06|
|Subject: Re: Mostly Harmless: Welcoming our C++ friends|
|Previous:||From: Kurt Harriman||Date: 2008-12-05 09:18:46|
|Subject: Re: Mostly Harmless: c++configure - patch 3 of 4|