From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-10-08 07:45:29
David Abrahams wrote:
> Alexander Terekhov <terekhov_at_[hidden]> writes:
>> Alan.Griffiths_at_[hidden] wrote:
>>> The problem is not the C++ standard; it is that is that catch (...)
>> Don't get me started on this, please.
> Really, don't. Alexander has repeatedly demonstrated his
> unwillingness or inability to explain and justify his claims in a way
> that makes sense to most people; asking him over and over to do so is
> just a waste of list bandwidth. I suggest you try to find someone
> else to ask who can be more helpful. For example, I sent an email to
> David Butenhof about this 2-phase EH business out of curiosity, since
> he seems to advocate it, but I have yet to hear back.
My understanding of the two phase business is as follows:
Phase 1: search for a handler;
Phase 2: unwind to that handler and invoke it, but only if a handler was
Extension: a function that performs phase 1 and returns a bool. No rationale
(readily) available. Not sure whether, or why, this is a good idea.
This doesn't play well with exception specifications since, if I understand
them correctly, (and I have no reason to, since I've never used one or seen
one used,) a violated exception specification is required to unwind, _then_
call unexpected(), which can then rethrow a different, "conforming",
It also implies that catch(...) should never, ever, be used with a rethrow
as a "finally", since it deceives phase 1. I'm not sure whether this is
going to work.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk