Reactive Systems logo
Reactis API V2022.2

API - Reactis (C Bindings):
Errors and Warnings

rsGetLastErrorReturns a string describing the most recent error.
rsGetNextWarningReturns a string describing the next unread warning.
rsGetNumWarningsReturns the number of unread warnings.
rsClearWarningsClears all currently stored warnings.
rsSetMaxNumWarningsSets the maximum number of warnings stored.


rsGetLastError

Returns a string describing the most recent error.

Syntax

const char *rsGetLastError(RsHandle *h);

Parameters

h
Pointer to an RsHandle structure as returned by rsOpen.

Return Value

Pointer to a string describing the most recent error message. A NULL value is returned if no error has occurred so far. Reactis allocates and releases the memory needed for the string. The pointer is only valid until the next call to any other API function.


rsGetNextWarning

Returns a string describing the next unread warning.

Syntax

const char * rsGetNextWarning(RsHandle *h);

Parameters

h
Pointer to an RsHandle structure as returned by rsOpen.

Return Value

Pointer to a string describing the next unread warning message. A NULL value is returned if no warning has occurred so far. Reactis allocates and releases the memory needed for the string. The pointer is only valid until the next call to rsGetNextWarning.


rsGetNumWarnings

Returns the number of unread warnings.

Syntax

int rsGetNumWarnings(RsHandle *h);

Parameters

h
Pointer to an RsHandle structure as returned by rsOpen.

Return Value

Number of unread warnings received during execution of Reactis API functions.


rsClearWarnings

Clears all currently stored warnings.

Syntax

void rsClearWarnings(RsHandle *h);

Parameters

h
Pointer to an RsHandle structure as returned by rsOpen.

Description

rsClearWarnings clears all unread warnings that were produced during previous API calls.


rsSetMaxNumWarnings

Sets the maximum number of warnings stored.

Syntax

void rsSetMaxNumWarnings(RsHandle *h, int n);

Parameters

h
Pointer to an RsHandle structure as returned by rsOpen.
n
Integer value specifying the maximum number of warnings to be stored

Description

rsSetMaxNumWarnings sets the maximum number of warnings that the API will store for retrieval. If the number of unread warnings exceeds the number set here then the oldest warnings will be dropped. In that case the next call to rsGetNextWarning() will return a message indicating the number of warnings that were dropped. Subsequent calls to rsGetNextWarning() will return the remaining warnings.

If the maximum number is set to 0, then no warnings will be stored. Calls to rsGetNextWarning will still return a message showing the number of warnings that were produced (and dropped).

If the maximum number is set to -1, then all warnings will be stored. Note that in some cases this can lead to excessive memory usage.

Default setting is to store 200 warnings.