Regular API function

simGetLastError (remote API equivalent: simxGetLastErrors)

Description Retrieves the last generated error message for the calling thread and/or script. By calling this function, the last error message is reset and a subsequent call to this function returns NULL. Errors are memorized on a thread- and/or script basis (e.g. each script have each an individual error handler, so does the C API functions (when the simulation thread and the GUI thread are differentiated)). See also simSetLastError, the sim_intparam_error_report_mode and the error report modes.
C synopsis simChar* simGetLastError()
C parameters
C return value
Error message buffer or NULL if no error message is present. The user has to delete the returned buffer with a call to simReleaseBuffer
Lua synopsis string lastError=simGetLastError()
Lua parameters
Same as C-function
Lua return values
Same as C-function (but nil instead of NULL, and simReleaseBuffer does not need to be called)

All regular API functions on one page