Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-06-04 16:06:50


Alexander Terekhov <terekhov_at_[hidden]> writes:

> Terje Slettebø wrote in message <Hi7Da.9988$KF1.142210_at_amstwist00>:
> [...]
>> > why shouldn't std::exception use std::strings?
>>
>> See here (http://www.boost.org/more/error_handling.html).
>
> "....
> Unfortunately, operating systems other than Windows also wind non-C++
> "exceptions" (such as thread cancellation) into the C++ EH machinery
> ...."
>
> There's no such thing as 'non-C++ "exceptions"'.

Exceptions that have no C++ type associated with them and exceptions
which are thrown by the system under conditions which the standard
does not allow for (e.g. asynchronous exceptions without the presence
of user-invoked undefined behavior) are what I mean by "non-C++
exceptions".

> Brain-damaged forced unwinding aside for a moment, an implementation
> provided exceptions for thread exit, cancelation... AND
> synchronous-signals-translated- to-exceptions ARE "normal" C++
> exceptions.

That really depends on the implementation.

> And, BTW, it's quite reasonable to expect that they're all derived
> from std::exception...

Except that they're not even always C++ types (c.f. Microsoft).

> "....
> if every exception were derived from std::exception and everyone
> substituted catch(std::exception&) for catch(...), the world would
> be a better place.
> ...."
>
> The world WILL be a better place when people finally realize that
> C++ DOES need a mandatory 2-phase exception handling and that the
> current C++ standard is seriously broken with respect to exceptions
> specs (plus a few other "less important" EH-related things). It
> desperately needs some fixing.

So quit complaining ineffectively and submit a DR with suggested
wording changes. [That is a non-boost issue, BTW. If you want to
discuss it, you should take it elsewhere]

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk