This is the mail archive of the
mailing list for the libstdc++ project.
Re: Implementing Exception Propagation (N2179)
- From: "Peter Dimov" <pdimov at mmltd dot net>
- To: "Sebastian Redl" <sebastian dot redl at getdesigned dot at>, <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 19 May 2008 18:06:15 +0300
- Subject: Re: Implementing Exception Propagation (N2179)
- References: <482F4610.firstname.lastname@example.org> <483192E4.email@example.com>
"Calls the terminate_handler function in effect immediately after
evaluating the throw-expression, if called by the implementation, [...]"
What about rethrow_exception(), then? Should it copy the terminate and
unexpected handlers from the old exception, and thus act like the current
implementation of rethrow? Or should it acquire the current handlers anew
and thus pretend it contains a throw-expression?
FWIW, my general intent was for rethrow_exception to behave exactly as
throw; does in the "synchronous" case. In this case this would imply
acquiring the current handlers as mandated by the standard. A possible
rationale for this behavior is that the old handlers may be obsolete by the
time rethrow_exception is called. (Some compilers even make them
thread-specific, but I'm not sure whether this will be conforming in C++0x.)