filmov
tv
Error & Exception Handling Throw & Rethrow Activities in Uipath Studio Part 3
Показать описание
#uipathcommunity #uipathlearner #uipathrpa #uipathtutorial #uipathtraining
Retry Scope :
The Retry Scope activity retries the contained activities as long as the condition is not met or an error is thrown.
This activity is used for catching and handling an error, which is why it’s similar to TryCatch. The difference is that this activity simply retries the execution instead of providing a more complex handling mechanism.
The activity has two main sections Actions and Conditions.
It can be used without a termination condition, in which case it'll retry the activities until no exception occurs or the provided number of attempts is exceeded.
Retry scope has two additional properties NumberOfRetries and RetryInterval.
The below graphic shows the Retry Scope Activity used in UiPath Studio along with its properties.
Actions
Conditions
NumberOfRetries
RetryInterval
Default Retry Count :3
Default retry interval : 5000 (5sec)
ContinueOnError :
The ContinueOnError is a property that specifies if the execution of the activity should continue even when the activity throws an error.
This field only supports Boolean values (True, False). The default value is False, thus, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
Keep in mind that, if the ContinueOnError is set to True on an Activity that has a scope such as (Attach Window or Attach Browser, in the classic, and Use Application Browser in the modern), then error thrown by all the activities inside the DO container of respective scope Activity will also be ignored.
Setting this property to True is not recommended in all situations. But there are some in which it makes sense, such as:
• While using data scraping - So that the activity doesn't throw an error on the last page when the selector of the 'Next' button is no longer found.
• bullet
When we are not interested in capturing the error but simply in the execution of the activity.
Throw Activity :
To generate a user defined exception we can use Throw Activity. By using Throw activity, you can apply all the business scenario validation in your code.
ReThrow Activity :
Throws a previously thrown exception from within a Try Catch activity. The error is rethrown retaining the original source of the exception. Rethrow can only be used within a Catch block of a Try Catch activity. In more simple language it is rethrowing the same error to outer try catch block. This most commonly when you are working in framework and with multiple workflow module.
Retry Scope :
The Retry Scope activity retries the contained activities as long as the condition is not met or an error is thrown.
This activity is used for catching and handling an error, which is why it’s similar to TryCatch. The difference is that this activity simply retries the execution instead of providing a more complex handling mechanism.
The activity has two main sections Actions and Conditions.
It can be used without a termination condition, in which case it'll retry the activities until no exception occurs or the provided number of attempts is exceeded.
Retry scope has two additional properties NumberOfRetries and RetryInterval.
The below graphic shows the Retry Scope Activity used in UiPath Studio along with its properties.
Actions
Conditions
NumberOfRetries
RetryInterval
Default Retry Count :3
Default retry interval : 5000 (5sec)
ContinueOnError :
The ContinueOnError is a property that specifies if the execution of the activity should continue even when the activity throws an error.
This field only supports Boolean values (True, False). The default value is False, thus, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
Keep in mind that, if the ContinueOnError is set to True on an Activity that has a scope such as (Attach Window or Attach Browser, in the classic, and Use Application Browser in the modern), then error thrown by all the activities inside the DO container of respective scope Activity will also be ignored.
Setting this property to True is not recommended in all situations. But there are some in which it makes sense, such as:
• While using data scraping - So that the activity doesn't throw an error on the last page when the selector of the 'Next' button is no longer found.
• bullet
When we are not interested in capturing the error but simply in the execution of the activity.
Throw Activity :
To generate a user defined exception we can use Throw Activity. By using Throw activity, you can apply all the business scenario validation in your code.
ReThrow Activity :
Throws a previously thrown exception from within a Try Catch activity. The error is rethrown retaining the original source of the exception. Rethrow can only be used within a Catch block of a Try Catch activity. In more simple language it is rethrowing the same error to outer try catch block. This most commonly when you are working in framework and with multiple workflow module.
Комментарии