Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-08-06 08:56:46

--- In boost_at_y..., "Hillel Y. Sims" <hys420_at_y...> wrote:
> OpenVMS 7.3 (and earlier) uses (VMS) exceptions to implement
pthread exit
> and cancellation. These system exceptions are catchable by "catch
> For this reason (and the fact that other types of events
intercepted by
> catch (...) include system exceptions such as accvios, various
> traps, etc.), we mandate that all code in our multi-threaded
> that does catch (...) must refrain from doing much more processing
> freing resources and must always "throw;" to reraise the exception,
> that it can be properly handled by the threads system (or a stack
> printed if an accvio occurred, etc). I don't imagine it's really
> valid for any code, except maybe absolute outermost-level error
> routines, to catch (...) w/o reraising the exception untouched --
> certainly not library code of any nature. I would be disappointed
to see
> one of our developers writing a catch (...) block w/o rethrowing,
and I
> would be disappointed to find that any third-party code I wanted to
> was using catch (...) blocks that did any kind of non-trivial
> and/or did not rethrow the exception.

It's not uncommon to hijack an exception in a catch(...) within a
destructor in order to insure the program isn't automatically
terminated. The worst consequence is the fact that use of exceptions
for cancellation will mean that no object can safely call a function
with a cancellation point within it's destructor.

Bill Kempf

Boost list run by bdawes at, gregod at, cpdaniel at, john at