<< Click to Display Table of Contents >> Navigation: Introduction to Framework > Errors in Explain script files |
Framework™ identifies two basic types of Explain™ errors.
When a script is loaded into Framework, it is "tokenized". During this process, the script is converted into a format that Framework's Explain interpreter can execute. If Framework encounters a section of the script that it cannot tokenize, it reports a compiler error. These compiler errors are reported in a Script Error dialog box similar to the one shown below.
Script error in an Explain script file.
The title of the error box indicates the type of error and the file name where the error occurred. In this example, a script error was reported within the cyclic voltammetry.exp Explain script file. The line number where the compiler error happened is shown in parentheses next to the script name. The error on line 256 was a misplaced COMMA when the compiler expected a parenthesis at the end of the expression (ENDPAREN).
A runtime error occurs while a script is being executed. This type of error is reported in a dialog box, similar to the figure below.
Runtime error in an Explain script file.
Similarly, the title of the error box indicates the type of error and includes the script name and the line number where the runtime error occurred. In this example, an error in line 31 of the cyclic voltammetry.exp Explain script has been found. The error message was a simple typing mistake: LABEL.New was mistyped as LABEL.Now. This is considered a runtime error rather than a compiler error because the compiler, which tokenizes the code, assumed that LABEL.Now would be defined in a another code module.
The line number reported in either type of error box may not be exact. Continuation lines can confuse the line-number counter. The line number reported in an error box is the line number being compiled or run when the error was detected. The incorrect line that really caused the error may be earlier in the script.
Use the Edit > Goto... command to quickly find the reported error line when you edit the file. |