I’m wondering how others use their Try/Catch blocks, to see if I could improve my methods or am doing something unnecessary.
Here’s what I usually put into them:
- a Log File activity to output info about the exception to the log
- a Take Screenshot activity with a Save Image activity, to capture the whole screen for troubleshooting purposes
- a Throw activity to throw the exception
What I’m mostly wondering about is that last one - using a Throw in the Catch. Does it make sense to do that, or is it redundant? Typically I want the process to stop running if there’s an error. So I use a Throw. Would it be better to use a Terminate Workflow activity?
What I’m thinking is I may be misunderstanding the point to the Throw activity. Is it supposed to be used more for application errors (like when the bot tries to log into a web site but the web site says “invalid password” then I’d use a Throw in order to trigger the Catch).