Boost logo

Boost :

From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2005-03-08 08:39:11


"Peter Dimov" <pdimov_at_[hidden]> writes:

| throw_exception.hpp doesn't contain helper TRY/CATCH/RETHROW macros
| for two reasons:
>
| 1. Most non-g++ compilers accept the exception handling constructs in
| "no exceptions" mode;

That doesn't help me.

and it is only re-throw that is problematic. The other constructs are
taken care of.

| 2. The proper way to fix code that relies on catch(...)+throw is to
| introduce a RAII guard. This also helps with other catch(...)-related
| problems.
>
| This reminds me that I need to fix shared_count.hpp to not contain a
| rethrow.

There the "no exceptions" case is handled. So strictly not needed.
 
| However, last time we discussed the issue, it was pointed out that the
| RAII way has performance implications compared to catch(...)+throw.
| This lead to detail/no_exception_support.hpp, which does contain a
| BOOST_RETHROW macro.

So either it should be used or the re-throw rewritten.

Seems to me that some semi-invasive changes must be done to
cpp_regex_traits.cpp to use RAII to make the
this->m_pmessages->close(cat) happen.

So the question is how to solve for 1.33. IMHO the simple solution
should be used: use BOOST_RETHROW and be done with it.
Later if that macro is unwelcome in the code, it can be rewritten.

-- 
	Lgb

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