At Target

Try Next Alternative

By its very nature, Try Next Alternative error handling refers to a Try step. This Try step must be a prior step on the current execution path, that is, it must be one of the steps whose execution led up to the current step. Otherwise the "next alternative" part of Try Next Alternative does not make much sense.

Consider a robot with several Try steps on the current execution path. In this situation, the robot will be in the process of executing a "current branch" relative to each of these Try steps, and for each of them the "next branch" is different. For example, in the following robot, if an error occurs in step B, Try Next Alternative continues execution using one of the following approaches.

  • The next branch at the rightmost Try step, so that execution skips step C and continues at step D
  • The next branch at the leftmost Try step, causing execution to skip both steps C and D and continues at step E

At target

You can define the option on the Error Handling tab. The following example shows the error handling configuration for step B.


Error handling Nearest Try step

The default is the Nearest Try step, but you can select other Try steps on the execution path. The reference to the Try step is by name; if several Try steps have the same name, the nearest (rightmost) one with that name is implied. This can be used to advantage as described in Try-Catch.

While this example only describes At targets in relation to Try Next Alternative error handling, you can use such references with the Next Iteration and Break Loop error handling options described in Looping. In those cases, the references go to loop steps rather than Try steps.