Boost logo

Boost :

From: Jeremy Day (jeremy.day_at_[hidden])
Date: 2006-07-27 17:58:29


On 7/27/06, Alexander Nasonov <alnsn_at_[hidden]> wrote:
>
> 1. catch(...) followed by rethrow might be less efficient than handle-seq.
> I never measured this, though.

I'm not sure exactly what sorts of inlining compilers can do with code like
I'm using to catch and rethrow (which is very similar to mpl::for_each,
since I copied the methodology almost exactly), so I'd be almost positive
that the preprocessor approach would be more efficient. I'd love to be
proven wrong, though.

I do have one concern about the preprocessor approach, though. Could the
user give the preprocessor a sequence, such as mpl::vector<std::exception,
std::logic_error>, and have that sequence sorted to
mpl::vector<std::logic_error, std::exception> internally to the preprocessor
macro? I'm automatically sorting the sequence in the code that I have now.

2. catch(...) catches too many things on some compilers. I know only one
> (very popular) compiler that also catches system exceptions (aka SEH).
> Though, I don't remember how it rethrows those exceptions.

It seems like catching SEH exceptions could be a good thing. I would
certainly like for ALL exceptions, whether they C or C++ exceptions, to go
through the same machinery. I can imagine that not everyone feels this way,
though.

Jeremy


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