Re: use exception in default catch(...)
josephgarry@gmail.com wrote:
In a default catch(...), I'd like to be able to look at the exception
that was caught, or somehow see what was thrown.
This would be immensely useful, for instance, in some sort of exception
handler one might have in main(), for instance.
It's also essential in multi-threaded code, in order to
propagate an unknown exception type accross a join. I believe
that the issue is being currently addressed in this context in
the committee. It's still rather vague (in my mind, at least),
but the committee is aware of the problem, and giving it some
consideration. (That doesn't mean that there will be an
absolute solution. The committee could well decide that only
certain types of exceptions can be propagated. But given that
the compiler has this information somewhere, consideration is
being given to making it available to the user.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]