From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-10-08 13:49:00
Alexander Terekhov wrote:
> Peter Dimov wrote:
>> This doesn't play well with exception specifications since,
> Those are pretty much broken anyway.
> (Subject: Re: Is internal catch-clause rethrow standard?)
>> 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
>> _then_ call unexpected(), which can then rethrow a different,
> That needs some fixing, right. std::unexpected() shall be invoked at
> throw point (as kinda "side effect" of throw-expression).
void f() throw(X); // calls g
void g() throw(Y); // calls h
void h() throw(Z); // throws Z();
The Z exception hits the throw(Y) wall; unexpected() eats the Z and throws
Y. Y hits throw(X), unexpected() now throws a X.
If you invoke unexpected() before the unwinding, there is no way you can get
an exception to escape through the three ex.specs.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk