I recently upgraded my project from VC++ 6.0 to VC++ 2005. I am trying to define some error logging in my custom termination routing. And here is what I did:
1. define
2. putCode:void term_func() { // some custom processing exit(-1); }
set_terminate( term_func );
somewhere in code that is definitely executed.
3. I have no "try-catch" in the entire program.
However when the program crashes --- due to a condition where fwrite to a null pointer --- term_func doesn't seem to be executed.
Does anyone know why? Should I change some of the project/compile properties?
Thanks in advance!