Re: Mostly Harmless: c++exception - 4 of 4

From:Kurt Harriman <harriman(at)acm(dot)org>
To:pgsql-hackers(at)postgresql(dot)org
Subject:Re: Mostly Harmless: c++exception - 4 of 4
Date:2008-12-05 09:20:18
Message-ID:[email protected]
Views:Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists:pgsql-hackers

(Re-sending just the fourth of four es: c++exception)

These es are based on CVS head in which the latest commit was
user: petere
date: Thu Dec 04 17:51:28 2008 +0000
summary: Default values for function arguments

4. c++exception

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 , 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.

AttachmentContent-TypeSize
c++exception.text/plain3.3 KB

In response to

Browse pgsql-hackers by date

 FromDateSubject
Next MessageGreg Smith2008-12-05 09:24:06Re: Mostly Harmless: Welcoming our C++ friends
Previous MessageKurt Harriman2008-12-05 09:18:46Re: Mostly Harmless: c++configure - 3 of 4