External Interfaces Reference Previous page   Next Page
mexErrMsgTxt

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.

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


Previous page  mexErrMsgIdAndTxt mexEvalString Next page

© 1994-2005 The MathWorks, Inc.