OpenersNotesSection(Spacer1)Details

WSClearError() will activate a previously unactivated link.

WSClearError() will return 0 for certain catastrophic errors such as WSEDEAD that indicates that the link has closed unexpectedly.

WSClearError() returns a nonzero value on successful completion.

WSClearError() is declared in the WSTP header file wstp.h.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include <stdio.h>
#include "wstp.h"

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

void f(WSLINK lp)
{
	if(! WSPutInteger(lp, 10))
	{
		printf("WSTP error: %s\n", WSErrorMessage(lp));
		WSClearError(lp);
	}
}

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

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Error and Interrupt Handling, paclet:tutorial/ErrorAndInterruptHandling])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Mac OS X), paclet:tutorial/WSTPDeveloperGuide-MacintoshOverview])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Unix and Linux), paclet:tutorial/WSTPDeveloperGuide-UnixOverview])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Windows), paclet:tutorial/WSTPDeveloperGuide-WindowsOverview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Alphabetical Listing of WSTP C Functions, paclet:guide/AlphabeticalListingOfWSTPCFunctions])}, {▪(RefLinkPlain[Low-Level WSTP Operations, paclet:guide/LowLevelWSTPOperations])}, {▪(RefLinkPlain[WSTP C Language Functions, paclet:guide/WSTPCLanguageFunctions])}})}})