Boost logo

Boost :

Subject: Re: [boost] [inspect] exceptions (FW: [Boost-users] no exceptions)
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2011-03-23 17:29:20


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.

> and there might be legitimate reasons for libraries not designed to
> operate without exceptions use throw.

Aside from ignorance, one reason to prefer throw over
BOOST_THROW_EXCEPTION is to ensure that BOOST_NO_EXCEPTONS builds
don't work, and that the exception object can't be transported between
threads. :)

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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