Section 8: Troubleshooting guide
Effects of errors on scripts
Most errors will not abort a running script. The only time a script is aborted is when a Lua run-time
error (errorerrorerror code -286, "TSP runtime error") is detected. Run-time errors are caused by
actions such as trying to index into a variable that is not a table.
Syntax errors (errorerrorerror code -285, "Program syntax" ) in a script or command will prevent
execution of the script or command.
Retrieving errors
When errors occur, the error messages are placed in the error queue. Use error queue commands to
request error message information. For example, the following commands request the next complete
error information from the error queue and return the code, message, severity, and node for that
error:
errorCode, message, severity, errorNode = errorqueue.next()
print(errorCode, message, severity, errorNode)
The following table lists the commands associated with the error queue.
Remote commands associated with the error queue
Command
errorqueue.clear()
errorqueue.count
errorqueue.next()
8-2
(on page 7-82)
(on page 7-83)
(on page 7-83)
Series 2600B System SourceMeter® Instrument Reference Manual
Description
Clear error queue of all errors
Number of messages in the error queue
Request next error message from
queue
2600BS-901-01 Rev. B / May 2013