External Interfaces/API Reference |
Issue error message with identifier and return to the MATLAB prompt
C Syntax
Arguments
identifier
String containing a MATLAB message identifier. See Message Identifiers in the MATLAB documentation for information on this topic.
error_msg
String containing the error message to be displayed. The string may include formatting conversion characters, such as those used with the ANSI C sprintf
function.
...
Any additional arguments needed to translate formatting conversion characters used in error_msg
. Each conversion character in error_msg
is converted to one of these values.
Description
Call mexErrMsgIdAndTxt
to write an error message and its corresponding identifier to the MATLAB window. After the error message prints, MATLAB terminates the MEX-file and returns control to the MATLAB prompt.
Calling mexErrMsgIdAndTxt
does not clear the MEX-file from memory. Consequently, mexErrMsgIdAndTxt
does not invoke the function registered through mexAtExit
.
If your application called mxCalloc
or one of the mxCreate
routines to allocate memory, mexErrMsgIdAndTxt
automatically frees the allocated memory.
Note
If you get warnings when using mexErrMsgIdAndTxt , you may have a memory management compatibility problem. For more information, see Memory Management Compatibility Issues in the External Interfaces documentation.
|
See Also
mexErrMsgTxt
, mexWarnMsgIdAndTxt
, mexWarnMsgTxt
mexCallMATLAB | mexErrMsgTxt |