WSClearError (C Function)
int WSClearError(WSLINK link)
clears errors on if possible.
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.
Examples
Basic Examples (1)Summary of the most common use cases
#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);
}
}