|
Boost : |
Subject: Re: [boost] [inspect] exceptions (FW: [Boost-users] no exceptions)
From: Vicente BOTET (vicente.botet_at_[hidden])
Date: 2011-03-22 15:34:23
> Message du 22/03/11 20:30
> De : "Emil Dotchevski"
> A : boost_at_[hidden]
> Copie à :
> Objet : Re: [boost] [inspect] exceptions (FW: [Boost-users] no exceptions)
>
> On Tue, Mar 22, 2011 at 12:16 PM, Krzysztof Czainski <1czajnik_at_[hidden]> wrote:
> > 2011/3/22 Emil Dotchevski
> >
> >> Why use BOOST_THROW_EXCEPTION to throw?
> >>
> >> - Typically, there is no need to do anything else to support
> >> BOOST_NO_EXCEPTIONS builds;
> >>
> >> - Enables boost::exception_ptr, so the exceptions you throw can be
> >> transported between threads;
> >>
> >> - Enables boost::error_info, so users can attach stuff to exceptions.
> >>
> >> - Enables better messages from boost::diagnostic_information.
> >>
> >
> > +1
> >
> > What about boost/detail/no_exceptions_support.hpp? Could that file be moved
> > to boost/exception for public use? I use it, but don't feel comfortable with
> > it being in the detail directory.
>
> This header is news to me. :) Maybe something like this could become a
> documented part of Boost Exception.
>
> I don't understand why the macros defined in no_exceptions_support.hpp
> expand to if("") { } else if(!"") { } etc. in BOOST_NO_EXCEPTIONS
> builds. Expanding to if(true) { } else if(false) { } seems more
> appropriate to me.
It seems that there were some issues with Borland
# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# define BOOST_TRY { if ("")
# define BOOST_CATCH(x) else if (!"")
# else
# define BOOST_TRY { if (true)
# define BOOST_CATCH(x) else if (false)
# endif
Best,
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk