Raising exceptions is great for alerting the robot when things are not going well. How then should the robot respond? When we ran the process from Studio, and if an exception was encountered, the process terminated with a pop-up dialog. The dialog contains the error type and detail, shown as follows:
To dismiss, the dialog, we simply clicked the OK button. However, the process has terminated. And in order to get it working again, we have to re-run the process.
A better way would be to see whether the robot is able to handle the error and continue running the rest of the process. Say, if the product page did not load, perhaps it could do the following:
- Wait a few seconds before retrying
- Retry for a fixed number of times before giving up
- Record the error message somewhere, like in an error log, and email a human that something has gone wrong