WSUCS2ErrorMessage()
This feature is not supported on the Wolfram Cloud.

const unsigned short * WSUCS2ErrorMessage(WSLINK l, int *n)
returns a characters string encoded in UCS2 encoding form of length n describing the last error to occur on the WSTP connection specified by l.

DetailsDetails

  • WSUCS2ErrorMessage() allocates memory that must be released by calling WSReleaseUCS2ErrorMessage().
  • WSUCS2ErrorMessage() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* A function for reading the error message from a link */

void f(WSINK l)
{
    const unsigned short *message;
    int length;

    message = WSUCS2ErrorMessage(l, &length);
    if(message == (const unsigned short *)0 || length == 0)
    { /* Unable to get the error message from the link */ }

    /* ... */

    WSReleaseUCS2ErrorMessage(l, message, length);
}
Introduced in 2014
(10.0)