Regular API function

simGetLastError / sim.getLastError

Description Retrieves the last generated API call error message for a plugin or a script. By calling this function, the last error message is reset and a subsequent call to this function returns nullptr or nil. See also simSetLastError, sim.getStackTraceback.
C synopsis simChar* simGetLastError()
C parameters
C return value
Error message buffer or nullptr if no error message is present. The user has to delete the returned buffer with a call to simReleaseBuffer
Lua synopsis string lastError=sim.getLastError([scriptHandle])
Lua parameters
scriptHandle: the script handle from which the last error is desired. If omitted, then the calling script's last error will be retrieved and cleared.
Lua return values
Similar to the C-function counterpart
Remote API equiv.
B0-based remote API: -
Legacy remote API: simxGetLastErrors