OpenersNotesSection(Spacer1)Details

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.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#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);
	}
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLError(), paclet:ref/c/MLError])  ▪  (NonWLLink[MLErrorMessage(), paclet:ref/c/MLErrorMessage])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Error and Interrupt Handling, paclet:tutorial/ErrorAndInterruptHandling])}})}})