Regular API function


Description Sets a custom error or warning message. This function is useful for plugins which wish to generate custom error/warning messages that will be displayed in the calling script. Errors/warnings are set and memorized on a thread-basis (e.g. threads originating from threaded scripts have each an individual error handler). See also sim.getLastError, the sim.intparam_error_report_mode and the error report modes.
C synopsis simInt simSetLastError(const simChar* funcName,const simChar* errorMessage)
C parameters
funcName: name of the function where the error originated. If funcName starts with "warning@", then a warning messages will be registered instead.
errorMessage: error or warning message
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis -
Lua parameters
Lua return values

All regular API functions on one page