| MATLAB Application Program Interface | Search  Help Desk |
| mexErrMsgTxt | Examples See Also |
Issue error message and return to the MATLAB prompt
C Syntax
#include "mex.h" void mexErrMsgTxt(const char *error_msg);
Arguments
error_msgDescription
CallmexErrMsgTxt to write an error message to the MATLAB window. After the error message prints, MATLAB terminates the MEX-file and returns control to the MATLAB prompt.
Calling mexErrMsgTxt does not clear the MEX-file from memory. Consequently, mexErrMsgTxt does not invoke the function registered through mexAtExit.
If your application called mxCalloc or one of the mxCreate routines to allocate memory, mexErrMsgTxt automatically frees the allocated memory.
Examples
Seextimesy.c in the refbook subdirectory of the examples directory.
For additional examples, see convec.c, findnz.c, fulltosparse.c, phonebook.c, revord.c, and timestwo.c in the refbook subdirectory of the examples directory.
See Also
mexWarnMsgTxt