Destructor called after exception?
Hi,
I'd like to determine, whether the destructor of an object was called during stack unwinding, after an exception was caught, or just the objects lifetime ended normally.
std::uncaught_exception() would be the standard solution, unfortunately it does not work (always returns false) in VC6 (SP5).
Below the contents of uncaught.cpp:
Code:
#include <exception>
_STD_BEGIN
_CRTIMP2 bool __cdecl uncaught_exception()
{ // report if handling a throw
return (false);
}
_STD_END
Funny stuff :)
Any alternatives, ideas?
Thanks in advance!