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

has been replaced by .

const char * MLErrorMessage(MLINK link)
returns a character string describing the last error to occur on link.

DetailsDetails

  • MLErrorMessage() allocates memory for the message string that must be released. Use MLReleaseErrorMessage() to release the memory allocated by MLErrorMessage(). If MLErrorMessage() returns NULL, do not call MLReleaseErrorMessage() on the NULL value.
  • MLErrorMessage() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "mathlink.h"

/* send the double precision floating-point number 3.22 to a link and print an error message if the send fails */

void f(MLINK lp)
{
    if(! MLPutReal64(lp, 3.22))
    {
        const char *message = MLErrorMessage(lp);

        /* unable to send 3.22 to lp */
        printf("MathLink Error: %s\n", message);

        MLReleaseErrorMessage(lp, message);
    }

    /* ... */
}