XenoGuard Documentation

On Error GoTo

Actions » Programming » Flow Control » On Error GoTo 

The On Error GoTo action activates a rule that causes execution to automatically resume at a label when an error occurs in a selected group of actions. The error can occur at any point. The rule remains active until you cancel it with On Error Continue.

Information The On Error Goto rules apply only within the same script. 

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Flow Control node, select the On Error GoTo action.


The action has the following input parameters:

name Description

Group Type

Sets the group of actions to which the rule will apply.

Allowed Context Scope
The name of the label to jump to when an error occurs in the action script.

Allowed Context Scopes

[-] Hide

Here is the list of "Group Type" you can select:

  • Mycrotools.Programming
  • Mycrotools.Windows
  • Mycrotools.HomeAutomation.Philips
  • Mycrotools.UserDefined

Example 1 (Run an action from a label when an error occurs):

This example encounters an error during the execution of the Add action and jumps to a given label and the Text is then output via Message Box.

See other flow control actions: 

For Loop
For Each
On Error Continue
Abort on Error