This is not my intention.
Originally posted by Fordy
Personally, if I wanted to see if a destrutor was called
Maybe I wasn't clear enough, sorry : I wrote a class (CallStack) which traces the call stack.
I need to know whether ~CallStack is called due to an exception, if so, output the callstack to the log file / stdout:
I had to comment out those lines, as they are useless (see my thread starter).
/*if( uncaught_exception() )
if( !myStackList.empty() )
Now let me explain the problem.
The CallStack object is instanciated through a macro in each function.
My problem is that I *have* to insert in the source in every catch block the call to dump() (though the DUMP macro ), which is ugly...
TRACE_FN(donuts); // instanciate CallStack object
const int a = 0;
int i = i/a; // division by zero - exception is thrown
DUMP; // dumping the CallStack
cout << "Exception caught!" << "\r\n";