TryCatch
TryCatch operation implements try-catch-finally control statement
supported by many programming languages. TryCatch operation has only one
parameter Title to comment on the TryCatch operation.
It contains three inline scenarios: Try, Catch, Finally. The
Try inline scenario executed first. If any error occurs during its
execution the Catch inline scenario is executed with two parameters:
${errorMessage} and ${errorStackTrace}. You can skip executing the Catch scenario as described below.
After trying to execute the
Try scenario and the Catch scenario (when it is not skipped),
the Finally inline scenario is executed. To add an operation to any
of the thre inline scenarios, right-click on its tree node and click
Append Operation. You can drag-and-drop operations inside the inline
scenarios and from/to outside them.
Skip executing the Catch scenario
To skip it unconditionally, click on the Catch tree node and check Skip catching.
You can also skip executing the Catch scenario only for some errors adding Ingnore rules. If Skip catching is checked the rules are ignored. The rules are evaluated in the order. Each rule must contain Text and Function. The following functions are supported:
- error message contains - ignores the error if the error message contains the text.
- stack trace contains - ignores the error if the stack trace contains the text.
- condition - ignores the error if the text is equal to the string
true. Using template literals with JavaScript expressions you can analyse the content oferrorMessageanderrorStackTracevariables. For example, you can define the text as:$(($il.variables.errorMessage.indexOf("Invalid object name 'non_existing_table'") !== -1 ? "true" : "false"))