Types of errors

LotusScript® recognizes two kinds of errors:

  • Compile-time errors

    Errors that are found and reported when the compiler attempts to compile the script. Common compile-time errors are syntax or naming errors.

    The compiler reports the error, together with a message and a link to online Help, which explains how to correct the error. You must correct the error and re-compile before the script can run.

  • Run-time errors

    Errors that are found when LotusScript® attempts to execute the script. A run-time error can't be predicted at compile time (e.g., "out of memory"). Run-time errors prevent a script from running to normal completion. When a run-time error occurs, script execution ends unless your script includes statements to handle the error. Examples of run-time errors are attempting to open a file that doesn't exist, or attempting to divide a number by a variable with a zero value.

    LotusScript® recognizes many run-time errors, and identifies each with a name, a number, and a standard message to describe it. Within a script, you can also define your own run-time errors and associate a number and a message with each one.

Note: Compile-time errors are also possible at run time. LotusScript® has an execute statement. If there are syntactic problems inside the string expression, a compile-time error is generated at run time.