Resume statement (LotusScript® Language)

Directs LotusScript® to resume script execution at a particular statement in a script, after an error has occurred.

Syntax

Resume [ 0 | Next | label ]

Elements

0

Resumes execution at the statement that caused the current error.

Next

Resumes execution at the statement following the statement that caused the current error.

label

Resumes execution at the specified label.

Usage

Use the Resume statement only in error-handling routines; once LotusScript® executes the Resume statement, the error is considered handled.

Resume continues execution within the procedure where it resides. If the error occurred in a procedure called by the current procedure, and the called procedure didn't handle the error, then Resume assumes that the statement calling that procedure caused the error:

  • Resume [0] directs LotusScript® to execute again the procedure-calling statement that produced the error.

    Note that this may result in an infinite loop, where in every iteration, the procedure generates the error and then is called again.

  • Resume Next directs LotusScript® to resume execution at the statement following the procedure call.

The Resume statement resets the values of the Err, Erl, and Error functions.

Example