MLUCS2ErrorMessage (C Function)
MLUCS2ErrorMessage has been replaced by WSUCS2ErrorMessage.
const unsigned short * MLUCS2ErrorMessage(MLINK l, int *n)
returns a characters string encoded in UCS2 encoding form of length n describing the last error to occur on the MathLink connection specified by l.
Details
- MLUCS2ErrorMessage() allocates memory that must be released by calling MLReleaseUCS2ErrorMessage().
- MLUCS2ErrorMessage() is declared in the MathLink header file mathlink.h.
Examples
Basic Examples (1)
#include "mathlink.h"
/* A function for reading the error message from a link */
void f(MLINK l)
{
const unsigned short *message;
int length;
message = MLUCS2ErrorMessage(l, &length);
if(message == (const unsigned short *)0 || length == 0)
{ /* Unable to get the error message from the link */ }
/* ... */
MLReleaseUCS2ErrorMessage(l, message, length);
}