Using VC++ 6 with both /GX and /EHa (suppot for both C++ and OS exceptions). Now I have this piece of code:
some_class* p = new some_class;
// p = NULL;
std::cout << "exception caught" << std::endl;
And my code just runs pass the catch statement, it causes a page fault somewhere else (without being cought) when I try to access anything on the heap again.
If I take the comment out of "p = NULL" then it works fine, the exception is caught.
My question is what's going on here? Why is the exception not being caught on the first place? Doesnt C++ treat OS exceptions the same way as the language exceptions? And if not, any solutions? Prefarably for VC++?