Skip to main content

Posts

Showing posts with the label Try Catch activity

Try Catch activity in UiPath RPA

The Try Catch activity catches a specified exception type in a sequence or activity, and either displays an error notification or dismisses it and continues the execution. As a mechanism, Try Catch runs the activities in the Try block and, if an error takes place, executes the activities in the Catches block. The Finally block is only executed when no exceptions are thrown or when an exception is caught and handled in the Catches block (without being re-thrown). Don'ts While the Try Catch activity can be helpful, it's important to avoid excessive usage. Catching an exception should only be done when there's a valid reason to do so. Typically, the Catch block is responsible for handling the exception and enabling error recovery. However, there are instances where an exception is caught performing certain actions, for the purpose of logging it, before being re thrown to higher levels. Here are a few examples where the Try Catch activity shouldn't be used: When dealing wit...