May 18th, 1999, 05:53 PM
Hi !
I'm familiar with the throw and catch statements as well as the THROW and CATCH, CATCH_ALL macros of Visual C++. I'm wondering how can I use these statements to catch access violation exceptions. In ADA, for example, these access violations would be captured using the exception identifier and the type of the exception would be a CONSTRAINT_ERROR. Is there a similar thing in C++ where I can catch constraint/access violations without checking the pointer against NULL. There are times when the pointer is not NULL but is pointing to an invalid object.
Thank you.
I'm familiar with the throw and catch statements as well as the THROW and CATCH, CATCH_ALL macros of Visual C++. I'm wondering how can I use these statements to catch access violation exceptions. In ADA, for example, these access violations would be captured using the exception identifier and the type of the exception would be a CONSTRAINT_ERROR. Is there a similar thing in C++ where I can catch constraint/access violations without checking the pointer against NULL. There are times when the pointer is not NULL but is pointing to an invalid object.
Thank you.