try-catch handling
-
I have a try-catch block as follows try { A(); } catch(...) { } When i was working with Visual C++ 6.0, any null pointer accessed within function A was caught by the above catch. But now after VS2005 conversion, the same catch doesn't handles null pointer access, and the program crashes. Please suggest on the Project Setting to be changed for this to work.
-
I have a try-catch block as follows try { A(); } catch(...) { } When i was working with Visual C++ 6.0, any null pointer accessed within function A was caught by the above catch. But now after VS2005 conversion, the same catch doesn't handles null pointer access, and the program crashes. Please suggest on the Project Setting to be changed for this to work.
-
I have a try-catch block as follows try { A(); } catch(...) { } When i was working with Visual C++ 6.0, any null pointer accessed within function A was caught by the above catch. But now after VS2005 conversion, the same catch doesn't handles null pointer access, and the program crashes. Please suggest on the Project Setting to be changed for this to work.
From MSDN : Also, in Visual C++ 2005, all objects in scope when the asynchronous exception is generated will not be destroyed even if the asynchronous exception is handled. Under /EHs, catch(...) will only catch C++ exceptions. Access violations and System.Exception exceptions will not be caught. Resolution : You can use Yes With SEH Exceptions (/EHa) option. To set this option - Click the C/C++ folder. Click the Code Generation property page. Modify the Enable C++ Exceptions property -- modified at 5:41 Monday 24th September, 2007
-
From MSDN : Also, in Visual C++ 2005, all objects in scope when the asynchronous exception is generated will not be destroyed even if the asynchronous exception is handled. Under /EHs, catch(...) will only catch C++ exceptions. Access violations and System.Exception exceptions will not be caught. Resolution : You can use Yes With SEH Exceptions (/EHa) option. To set this option - Click the C/C++ folder. Click the Code Generation property page. Modify the Enable C++ Exceptions property -- modified at 5:41 Monday 24th September, 2007