I am writing a Maya plugin where I have a very simple line
MDoubleArray myArray(numPoints * numFaces);
So I decided to test the plugin under extreme conditions, and really send a number of points and faces that couldn't be allocated on the stack like this. Obviously, the program crashes with a Fatal Error. The problem is, I then try catching that exception to treat it:
try{
MDoubleArray myArray(numPoints * numFaces);
} catch(...){
//cleanup
}
And I still get the Fatal Error. When debuggin with Visual Studio, I get an unhandled exception, even though I'm trying to catch it. I even tried microsoft's __try and __except (EXCEPTION_EXECUTE_HANDLER), to no avail.
Any ideas? Thanks.