External Interfaces Reference |
Issue error message and return to MATLAB prompt
C Syntax
Arguments
error_msg
String containing the error message to be displayed.
Description
Call mexErrMsgTxt
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.
Note
If you get warnings when using mexErrMsgTxt , you may have a memory management compatibility problem. For more information, see Memory Management Compatibility Issues.
|
Examples
See xtimesy.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
mexErrMsgIdAndTxt
, mexWarnMsgTxt
, mexWarnMsgIdAndTxt
mexErrMsgIdAndTxt | mexEvalString |
© 1994-2005 The MathWorks, Inc.