c++ - When Does Visual Studio 6 Catch Structured Exceptions? -
It's mostly curiosity, but I'm reading about the history of Visual Studio CH exception to C ++ Trying to create a try I have been claiming that the old version of Visual Studio, which was enabled with the / GX flag, protected "some time" in a C ++
hold
block Win32 can catch exceptions
Under what circumstances created with the Visual Studio 6.0 / GX flag On the go, enter the catch block in the following code?
char * p = null; Try {* p = 'A'; } Hold (...) {printf ("catching \ n"); }
Visual Studio 6 + SP6 prevents programmers with a pseudo-exception in their simple tests and is not printed in "grip", however, some articles (eg A) Let me insist that it is possible to enter the hold
block.
int main () {__try {int * pInt = NULL; * PInt = 0; // Enter any exception exception} __exapter (EXCEPTION_EXECUTE_HANDLER) {DWORD dw = GetExceptionCode (); Switch (dw) {case EXCEPTION_ACCESS_VIOLATION: Cot & lt; & Lt; "Access violation \ n"; break; Case EXCEPTION_INT_DIVIDE_BY_ZERO: cout & lt; & Lt; "Split difference from zero \ n"; break; Case EXCEPTION_FLT_DIVIDE_BY_ZERO: cout & lt; & Lt; "Floating point zero \ n"; break; // other cases}} return 0; }
Thats probably the only way I am searching on the net.
In addition to this, I think that even you know that it is not good to handle such exceptions, yet to go here for Googlers, read:
Comments
Post a Comment