# Try/Catch

The block implements the Try/Catch structure. For proper operation, the blocks of this container must end with an "End" block. In case of an error in the blocks, exit will be implemented through the "If Error" connector. Otherwise, it will exit through the "Exit" connector.

To simulate the Finally structure, a manual connection of blocks after error handling with the "Exit" connector blocks is required. If no block is connected to the "If Error" connector, the error will be ignored, and the exit will occur through the "Exit" connector. If the "Exit" connector is not connected, and there is no error, a return from the current diagram will occur.

<table data-header-hidden><thead><tr><th width="269" valign="top"></th><th width="299" valign="top"></th></tr></thead><tbody><tr><td valign="top">Number of attempts</td><td valign="top">[Text] The block will not exit through the "If Error" connector until the specified number of attempts has been completed.</td></tr><tr><td valign="top">Pause between attempts</td><td valign="top">[Number] Value in seconds for the delay between attempts.</td></tr><tr><td valign="top">Variable 1</td><td valign="top"><p>[Variable] The name of the first variable to which a new value needs to be assigned.</p><p>You can select from the dropdown list a variable that was previously declared in the Variables panel, as well as enter the name of a new variable or one that was used earlier in another block, even if it was not declared in the Variables panel.</p></td></tr><tr><td valign="top">Value 1</td><td valign="top"><p>[Any data type] The new value for the first variable. The property is ignored if the name of the first variable is not specified. The new value of the variable can be either a constant (number, string) or an expression using other variables and/or functions.</p><p>In the new value of the variable, it is allowed to use an expression involving the same variable. Remember that here and in other blocks, the variable names used in expressions must start with the <code>$</code> symbol, and string constants must be enclosed in quotes.</p></td></tr><tr><td valign="top">Variable 2</td><td valign="top"><p>[Variable] The name of the second variable to which a new value needs to be assigned.</p><p>You can select from the dropdown list a variable that was previously declared in the Variables panel, as well as enter the name of a new variable or one that was used earlier in another block, even if it was not declared in the Variables panel.</p></td></tr><tr><td valign="top">Value 2</td><td valign="top"><p>[Any data type] The new value for the second variable. The property is ignored if the name of the second variable is not specified. The new value of the variable can be either a constant (number, string) or an expression using other variables and/or functions.</p><p>In the new value of the variable, it is allowed to use an expression involving the same variable. Remember that here and in other blocks, the variable names used in expressions must start with the <code>$</code> symbol, and string constants must be enclosed in quotes.</p></td></tr><tr><td valign="top">Variable 3</td><td valign="top"><p>[Variable] The name of the third variable to which a new value needs to be assigned.</p><p>You can select from the dropdown list a variable that was previously declared in the Variables panel, as well as enter the name of a new variable or one that was used earlier in another block, even if it was not declared in the Variables panel.</p></td></tr><tr><td valign="top">Value 3</td><td valign="top"><p>[Any data type] The new value for the third variable. The property is ignored if the name of the third variable is not specified. The new value of the variable can be either a constant (number, string) or an expression using other variables and/or functions.</p><p>In the new value of the variable, it is allowed to use an expression involving the same variable. Remember that here and in other blocks, the variable names used in expressions must start with the <code>$</code> symbol, and string constants must be enclosed in quotes.</p></td></tr><tr><td valign="top">Variable 4</td><td valign="top"><p>[Variable] The name of the fourth variable to which a new value needs to be assigned.</p><p>You can select from the dropdown list a variable that was previously declared in the Variables panel, as well as enter the name of a new variable or one that was used earlier in another block, even if it was not declared in the Variables panel.</p></td></tr><tr><td valign="top">Value 4</td><td valign="top"><p>[Any data type] The new value for the fourth variable. The property is ignored if the name of the first variable is not specified. The new value of the variable can be either a constant (number, string) or an expression using other variables and/or functions.</p><p>In the new value of the variable, it is allowed to use an expression involving the same variable. Remember that here and in other blocks, the variable names used in expressions must start with the <code>$</code> symbol, and string constants must be enclosed in quotes.</p></td></tr><tr><td valign="top">Variable 5</td><td valign="top"><p>[Variable] The name of the fifth variable to which a new value needs to be assigned.</p><p>You can select from the dropdown list a variable that was previously declared in the Variables panel, as well as enter the name of a new variable or one that was used earlier in another block, even if it was not declared in the Variables panel.</p></td></tr><tr><td valign="top">Value 5</td><td valign="top"><p>[Any data type] The new value for the fifth variable. The property is ignored if the name of the first variable is not specified. The new value of the variable can be either a constant (number, string) or an expression using other variables and/or functions.</p><p>In the new value of the variable, it is allowed to use an expression involving the same variable. Remember that here and in other blocks, the variable names used in expressions must start with the <code>$</code> symbol, and string constants must be enclosed in quotes.</p></td></tr><tr><td valign="top">Expression 1</td><td valign="top">[Expression] The expression that needs to be executed. It must be written in PowerShell language format.</td></tr><tr><td valign="top">Expression 2</td><td valign="top">[Expression] The expression that needs to be executed. It must be written in PowerShell language format.</td></tr><tr><td valign="top">Expression 3</td><td valign="top">[Expression] The expression that needs to be executed. It must be written in PowerShell language format.</td></tr><tr><td valign="top">Expression 4</td><td valign="top">[Expression] The expression that needs to be executed. It must be written in PowerShell language format.</td></tr><tr><td valign="top">Expression 5</td><td valign="top">[Expression] The expression that needs to be executed. It must be written in PowerShell language format.</td></tr><tr><td valign="top">Message level</td><td valign="top"><p>Select the message level that the blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block's work.</td></tr></tbody></table>
