catch¶
A catch
statement is also a sequence of operations.
Operations contained in a catch
statement will be executed only if the step failed when executing the operations in the step's try statement.
Tip
All operations of a catch
statement will be executed regardless of the success or failure of each of them.
Operations¶
A catch
statement supports only the following operations:
Inheritance¶
Under certain circumstances, it can be useful to configure catch blocks at a higher level than the step grain. At the test or configuration level.
This allows for declaring common catch statements we want to execute when an error occurs. Those catch blocks are combined to produce the final catch block in the following order:
- catch statements from the configuration level are executed first (if any)
- catch statements from the test level are executed next (if any)
- catch statements from the step level are executed last (if any)