I compile my code from the MATLAB command prompt using the following command:
mex ctest.c CFLAGS='$CFLAGS -fexceptions'
mexopts.sh also shows that the fexception flag is included. When I call ctest from the command prompt, MATLAB still closes down when calling mexErrMsgTxt().
Best Answer