Boost logo

Boost :

Subject: Re: [boost] [inspect] exceptions (FW: [Boost-users] no exceptions)
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-03-24 12:34:49


At Wed, 23 Mar 2011 14:29:20 -0700,
Emil Dotchevski wrote:
>
> On Wed, Mar 23, 2011 at 1:47 PM, Gruenke, Matt <mgruenke_at_[hidden]> wrote:
> > Whatever arguments there are for using BOOST_THROW_EXCEPTION()
> > vs. throw, that seems a somewhat independent matter.  Simply making
> > this substitution does not guarantee that the library will work properly
> > with exceptions disabled,
>
> It is not independent matter because that is exactly what
> BOOST_THROW_EXCEPTION guarantees, except when the library contains
> try..catch or rethrows using throw without arguments, which are rare
> cases. I agree that going the extra mile to workaround those
> additional cases is usually unreasonable.

I suppose that might be true, depending on your definition of "work
properly." There's no such thing as "working properly without
exceptions" if the library was coded for use with exceptions and you
really need a recoverable response to, say, resource exhaustion.

That said, "libraries should generally use BOOST_THROW_EXCEPTION" is a
good rule for Boost, and I wouldn't mind having something like it in
the inspect tests, provided that libraries with a legitimate reason
not to use it can be registered as exceptions to the rule.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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