In article <Du******************************@comcast.com>,
aw***@yahoo.com says...
FAQ 17.3 says: "never throw an exception from a destructor while
processing another exception"
What mechanism is available for me to know if an exception is being
processed?
That's what uncaught_exception() does -- sort of.
I imagine this knowledge being useful in a case like the following.
See:
http://www.gotw.ca/gotw/047.htm
You're characterized the utility of the information perfectly: it's
purely imaginary. Your code fits closely with how most people thought it
would be useful -- but it turns out it's a mistake, and I've yet to see
anybody come up with a way to use unaught_exception that was useful.
Likewise, there's really no way to let an exception escape for a dtor
without it potentially causing problems -- and the difference between
"potentially" and "inevitably" is essentially nonexistent.
--
Later,
Jerry.
The universe is a figment of its own imagination.