Reactive Systems logo
Reactis API V2022.2

API - Reactis (MATLAB Bindings):
Errors and Warnings

rsGetLastErrorReturns a string describing the most recent error.
rsSetWarningModeEnables/Disables automatic printing of warnings.
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

S = rsGetLastError()

Description

S = rsGetLastError() 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.


rsSetWarningMode

Enables/Disables automatic printing of warnings.

Syntax

rsSetWarningMode(N)

Description

rsSetWarningMode(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 rsGetNumWarnings() will always return 0 and rsGetNextWarning() will always return an empty string.

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

See Also

rsGetNextWarning, rsGetNumWarnings, rsClearWarnings


rsGetNextWarning

Returns a string describing the next unread warning.

Syntax

S = rsGetNextWarning()

Description

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

Returns an empty string if no warnings remain. If warnings were dropped (see function rsSetMaxNumWarnings) then the returned string will be a message indicating the number of warnings that have been dropped.

See Also

rsGetNumWarnings, rsGetNumWarnings, rsClearWarnings


rsGetNumWarnings

Returns the number of unread warnings.

Syntax

N = rsGetNumWarnings()

Description

N = rsGetNumWarnings() returns the number of unread stored warnings received during execution of Reactis API functions. Note that dropped warnings are still included in this count and therefore the value returned by rsGetNumWarnings() may exceed the maximum number set in rsSetMaxNumWarnings().

See Also

rsGetNextWarning, rsClearWarnings


rsClearWarnings

Clears all currently stored warnings.

Syntax

rsClearWarnings()

Description

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

See Also

rsGetNextWarning, rsGetNumWarnings


rsSetMaxNumWarnings

Sets the maximum number of warnings stored.

Syntax

rsSetMaxNumWarnings(N)

Description

rsSetMaxNumWarnings(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 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.

See Also

rsGetNextWarning, rsGetNumWarnings, rsClearWarnings