Topic: Code executing "under" exception?


Author: "Vlad Vinogradsky" <vinogradsky@rdaconsultants.com>
Date: 1997/10/30
Raw View
Is there any reasonably portable way to determine that a piece of code is
executing as a part of exception "processing" (e.g. in a destructor called
in the process of "unwinding" the stack)?

--
Vlad Vinogradsky
RDA Consultants, Ltd. (www.rdaconsultants.com)
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Date: 1997/10/30
Raw View
"Vlad Vinogradsky" <vinogradsky@rdaconsultants.com> writes:

>Is there any reasonably portable way to determine that a piece of code is
>executing as a part of exception "processing" (e.g. in a destructor called
>in the process of "unwinding" the stack)?

The uncaught_exception() function defined in <exception> is probably
what you are looking for.  See 18.6.4 [lib.uncaught].

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: "Vlad Vinogradsky" <vinogradsky@rdaconsultants.com>
Date: 1997/10/29
Raw View
Is there any reasonably portable way to determine that a piece of code is
executing as a part of exception "processing" (e.g. in a destructor called
in the process of "unwinding" the stack)?

--
Vlad Vinogradsky
RDA Consultants, Ltd. (www.rdaconsultants.com)
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]