In some cases it is desirable to throw an error on demand within a
Begin Error Handling ... End Error Handling block when a certain validation fails. When the error is been thrown, the Error Handling actions should be executed.
In meta
Code:
Begin Error Handling
...
If some validation fails (e.g. check radio button not selected) Then
throw an error by using Read From Non-existing File
End If
...
End Error Handling Since there is no
Throw Error command available (yet). The following workaround could be used: Use the
Read From File command to start to read data from a
non-existing file. You only need the
Read From File command. The
Start loop '' Each row in a CSV/Text file of Session='SomeSessionName' can be omitted since there will be no actual data to be read. This
Read From File command will cause an error (File not found) resulting in the Error Handler to be executed.
This is a
workaround and should not be used as a structural solution to the issue.