Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2003-06-06 07:53:03


David Abrahams wrote:
[...]
> > bool expected_exception<T>();
> > ...."
> >
> > He hasn't yet replied... well, perhaps YOU could shed some light? ;-)
>
> I don't know; I haven't been probing people about changes we could
> make to the EH specification, and I doubt I could do it effectively
> because I don't understand the issues at a deep level. The way the
> committee works is that those who care (meaning you) have to
> participate, or nothing changes.
>
> I can say that I _sense_ no general desire to change anything
> significant about EH, but that may just be because nobody knows
> there's an important issue. With that, I'll repeat: please take this
> non-Boost-related part of your discussion off-list.

Okay. But fix the "http://www.boost.org/more/error_handling.html", please.

FYI, <Forward-Inline>

-------- Original Message --------
Message-ID: <3EE08DDC.A3A7A32D_at_[hidden]>
Date: Fri, 06 Jun 2003 14:49:32 +0200
Newsgroups: comp.std.c++
Subject: std0X::expected_exception<T>()

"....
 template<class T> bool expected_exception() throw();
 Returns: true if matching handler is found.
 Notes: if expected_exception<T>() returns false then
 throwing T (at the point of expected_exception<T>()
 invocation) will result in the invocation of unexpected()
 handler with an exception consider caught. In effect,
 (in this new edition of this International Standard:-)

     if (!std::expected_exception<T>()) {
       throw T(/*...*/);
     }

 is equivalent to:

     if (!std::expected_exception<T>()) {
       try {
         throw T(/*...*/);
       }
       catch(const T&) {
         std::unexpected();
       }
     }
 ...."

Would you vote against it? Why?

TIA.

Well, "the context" is this:

http://lists.boost.org/MailArchives/boost/msg48162.php
http://lists.boost.org/MailArchives/boost/msg48211.php
([boost] Re: Exception handling... it's time to fix the
 http://www.boost.org/more/error_handling.html)

regards,
alexander.


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