From: David Abrahams (dave_at_[hidden])
Date: 2002-08-02 23:06:39
From: "Thomas Witt" <witt_at_[hidden]>
> On Friday 02 August 2002 16:01, David Abrahams wrote:
> > From: "Thomas Witt" <witt_at_[hidden]>
> > Eating the exception is a viable approach on any of these platforms,
> > may be preferable to termination when uncaught_exception is
> This might created a false sense of safety. In order to have the same
> behaviour as on platforms that have uncaught_exception(), you will need
> something like the following to "restore" the exception.
> pseudo-code untested.
> void gunc(ostream& out)
> // Make sure io_state_saver dtor is called before we
> // try to restore io exceptions.
> io_state_saver s(out);
> // Do smth.
> // trigger an exception if the state_saver ate it even if no
> // stack unwinding ocurred.
> I think that this is clumsy enough to not use this approach for platforms
> where uncaught_exception is available, but it is easily forgotton on
> platforms where uncaught_exception is not available.
But my point is that it's really too early for any of this discussion
because nobody's done the hard work of analyzing the use cases and deciding
what the most appropriate behavior is.
There are lots of possibilities; to throw out another without due
consideration, one could think of eating the exception and setting the
corresponding error flags in the stream.
Again, it's too early to argue about whether eating exceptions or any other
action is appropriate here. We need analysis.
David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk