Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2007-09-13 17:54:05


Howard Hinnant wrote:
> I am requesting comments, both for and against a "sticky exception".
> A sticky exception is one in which once thrown, is very hard to catch
> and handle, without an implicit rethrow. This represents some
> condition which the thrower believes is sufficiently severe that the
> application (or thread) should clean up resources, but not be allowed
> to continue, even with a catch (...) which does not rethrow.

Here are a two arguments against:

1) The whole point of throwing an exception is that the program _can_
recover and not just clean up and exit.

2) If I write catch(...) in a destructor, I would be unpleasently surprised
if it ends up throwing after all.

What use cases do you have in mind anyway?

Emil Dotchevski
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