User Tools

Site Tools


action:Try_or_Catch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

action:Try_or_Catch [2021/10/12 04:06]
peternlewis created
action:Try_or_Catch [2021/10/12 04:11] (current)
peternlewis
Line 1: Line 1:
 ====== Try/Catch Action ====== ====== Try/Catch Action ======
  
-The *Try/Catch* action (v10.0+) allows you to execute a sequence of actions and catch any failure. If any action in the *Try* sequence would abort the macro, the macro instead continues executing the *Catch* section, setting the Action Result, available in the [[token:​ActionResult|%ActionResult%]] token or [[condition:​Action_Result|Action Result]] condition.+The *Try/Catch* action (v10.0+) allows you to execute a sequence of actions and catch any failure. If any action in the *Try* sequence would abort the macro, the macro instead continues executing the *Catch* section, setting the Action Result, available in the [[token:​ActionResult|%ActionResult%]] token or [[condition:​Action_Result|Action Result]] condition.  
 + 
 +Keep in mind the Action Result will be cleared at the end of any successful action, so if you want to know why the actions failed you will need to handle the Action Result in the first action of the *Catch* sequence, perhaps by saving the *%ActionResult%* in a variable.
  
 If the actions in the *Try* sequence execute to completion, the *Catch* sequence is not executed. If the actions in the *Try* sequence execute to completion, the *Catch* sequence is not executed.
action/Try_or_Catch.1634025972.txt.gz · Last modified: 2021/10/12 04:06 by peternlewis