Reactive Systems logo
Reactis for C API V2022

Reactis for C API:
Errors and Warnings

rcGetLastErrorReturns a string describing the most recent error.
rcSetWarningModeEnables/Disables automatic printing of warnings.
rcGetNextWarningReturns a string describing the next unread warning.
rcGetNumWarningsReturns the number of unread warnings.
rcClearWarningsClears all currently stored warnings.
rcSetMaxNumWarningsSets the maximum number of warnings stored.


rcGetLastError

Returns a string describing the most recent error.

Syntax

S = rcGetLastError()

Description

S = rcGetLastError() returns a string S describing the most recent error that occurred during a Reactis API function call. An empty string is returned when there are no errors.


rcSetWarningMode

Enables/Disables automatic printing of warnings.

Syntax

rcSetWarningMode(N)

Description

rcSetWarningMode(N) enables or disables automatic printing of warning message.

If N=1 (default setting), then any warnings generated during an API call will automatically be printed to the MATLAB command window. The printed warnings are also removed from the list of stored warnings. In this mode, calling rcGetNumWarnings() will always return 0 and rcGetNextWarning() will always return an empty string.

If N=0, then warnings will not be printed but will be stored for retrieval via the rcGetNextWarning() function.

See Also

rcGetNextWarning, rcGetNumWarnings, rcClearWarnings


rcGetNextWarning

Returns a string describing the next unread warning.

Syntax

S = rcGetNextWarning()

Description

S = rcGetNextWarning() returns a string S describing the next (oldest) unread warning that occurred during a Reactis API function call.

Returns an empty string if no warnings remain.

See Also

rcGetNumWarnings, rcGetNumWarnings, rcClearWarnings


rcGetNumWarnings

Returns the number of unread warnings.

Syntax

N = rcGetNumWarnings()

Description

N = rcGetNumWarnings() returns the number of unread warnings received during execution of Reactis API functions.

See Also

rcGetNextWarning, rcClearWarnings


rcClearWarnings

Clears all currently stored warnings.

Syntax

rcClearWarnings()

Description

rcClearWarnings() clears all unread warnings that were produced during previous API calls.

See Also

rcGetNextWarning, rcGetNumWarnings


rcSetMaxNumWarnings

Sets the maximum number of warnings stored.

Syntax

rcSetMaxNumWarnings(N)

Description

rcSetMaxNumWarnings(N) 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 rcGetNextWarning() will return a message indicating the number of warnings that were dropped. Subsequent calls to rcGetNextWarning() will return the remaining warnings.

If the maximum number is set to 0, then no warnings will be stored. Calls to rcGetNextWarning 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.

See Also

rcGetNextWarning, rcGetNumWarnings, rcClearWarnings