I’m getting EXC_BAD_ACCESS indicating a null or bad pointer. I would like to catch it to protect my users from a crash. But where is it defined? So far I am doing
#include <exception>
. . .
try {
// blah blah blah
} catch (const EXC_BAD_ACCESS& e) {
printf("Invalid pipe”);
}
But it tells me, EXC_BAD_ACCESS undefined. I have also tried exc_bad_access, a capitalization style that seems friendlier to the way <exception>
does business. Neither works. What is the correct way to refer to this exception?