Possible Duplicate:
How to prevent crash in C++
typedef struct {
int val;
} valStruct;
main()
{
try {
valStruct *s = NULL;
int v = s->val; // bad
}
catch (...) {}
}
Fairly new to MacOS. Running under the debugger I get a EXC_BAD_ACCESS break. Not too hard to guess that it means a bad memory access occurred, but I do not get a C++ exception and in the code above my catch will not be invoked.
This seems to be a bad thing, pretty much rendering C++ exception handling useless. Unless this is just a debug thing. If I run in release mode, or change settings, will this be handled as an exception?