|
Boost : |
Subject: Re: [boost] Boost and exceptions
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-06-22 02:30:51
Le 22/06/12 01:55, Robert Ramey a écrit :
> Vicente J. Botet Escriba wrote:
>>
>> Hi Robert,
>>
>> I propose you a different thing. Instead of changing again the name of
>> boost::throw_exception, we can add something like
>> boost::throw_strict_exception that will either throw the given
>> exception or no throw at all depending on BOOST_NO_EXCEPTIONS as it was
>> the case
>> before the introduction of Boost.Exception.
> Nothing wrong with this idea. It would address the situation where multiple
> libraries are re-implenting the same functionaliy to avoid the extra
> dependency.
> (I'm not all that crazy about the name - maybe
> boost::maybe_throw_exception).
> So I'm on board with this if we can't get a concensus on fixing the root
> problem.
>
I don't see any other way if backward compatibility must be preserved ;-)
I like the maybe_ prefix. It states clearly the intent of the function.
What about boost::maybe_throw(e)? It is shorter and closer to the
throw(e) it is a replacement of.
Could you see if the authors that have its own throw_exception version
share the approach?
Best,
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk