Mathematica > Systems Interfaces & Deployment > C/C++ Language Interface > MathLink C Language Functions > MLClearError() >
Mathematica > Systems Interfaces & Deployment > MathLink API > MathLink C Language Functions > MLClearError() >

MLClearError()

int MLClearError(MLINK link)
clears errors on if possible.
  • MLClearError() will activate a previously unactivated link.
  • MLClearError() will return 0 for certain catastrophic errors such as MLEDEAD that indicates that the link has closed unexpectedly.
  • MLClearError() returns a nonzero value on successful completion.
  • MLClearError() is declared in the MathLink header file mathlink.h.
#include <stdio.h>
#include "mathlink.h"

/* send an integer to a link and check for an error */

void f(MLINK lp)
{
    if(! MLPutInteger(lp, 10))
    {
        printf("MathLink error: %s\n", MLErrorMessage(lp));
        MLClearError(lp);
    }
}
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF