scriptExecutionErrors

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
put the scriptExecutionErrors
Summary

Reports a list of all possible LiveCode script execution errors.

Introduced6.0
OSmac, windows, linux
Platformsdesktop, server
Example
-- Use of scriptExecutionErrors in a try statement
on mouseUp
  local tErr
  try
    CommandThatDoesNotExist -- execution error in this line
  catch tErr
    put line (item 1 of tErr) of the scriptExecutionErrors
    -- reports details about the error
  end try
end mouseUp
Values
NameTypeDescription
Value

The scriptExecutionErrors returns a return-separated list containing descriptions of all possible errors thrown during handler execution.

RelatedKeyword: catch, item
Message: scriptExecutionError
Glossary: error message, execute, execution error, IDE, item, standalone application
Control Structure: try, throw
Description

Use the scriptExecutionErrors property to get a list of all possible errors thrown during handler execution. When a script throws an error during execution it returns a four-item, comma separated error code, as follows:

  • item 1 - the line number of the scriptExecutionErrors that describes the error.
  • item 2 - the line number of the script where the execution error occurs.
  • item 3 - the character position on the line of the token or command that threw the error.
  • item 4 (optional) - the token or command that threw the error.

In the example above might return an error code in the catch clause, such that the variable tErr would contain something like this:

573,4,13,in

This would indicate that the error description is found on line 573 of the scriptExecutionErrors, and that the error occurred on line 4 of the script, on character 13, the token 'in'.

The scriptExecutionErrors property is read-only and cannot be set.

Note: The scriptExecutionErrors property returns the list of errors only in the IDE and LiveCode Server. It returns empty in standalones.