Business Exception –
A business exception is a term used to describe an issue that is caused by inaccurate or missing data that is essential to the automation project. This may happen, for instance, when a project needs to retrieve data from a column in an excel sheet that the company has provided, but the file is missing that column.
When we apply a standard template to our project, we also refer to it as a user-defined exception and, if the requirement is not met in such case, we must declare the business exception in the code. Rerunning the transaction has no prospect of resolving the problem, and alerting the human user to the error would be a better course of action.
A bot will try to log in when your login information is changed just on backend while you are still logged into the application and will throw a business exception containing the text “Invalid username password.” Another excellent illustration of a business exceptional scenario is this one.
Throwing Business Exception in UiPath Tool:
You could use a Throw Activity in an else section and raise a business exception whenever you are determining whether or not the conditions and business rules are met.
Steps to capturea Business Exception in UIPATH Tool:
- Visit the Catch section of trycatching.
- The Exception Area should be lowered.
- Take a look just at Business exception class.
- Choose the exclusion. After completing these procedures under the business section, you can specify the action you would like to take in the case of a business exception.
System Exception –
System exceptions can happen at any time as a result of the item’s unavailability that you stated in your procedure. For instance, in a project where a URL has to open in the browser but the URL also isn’t responding, you may run into an error that falls under the category of a system exception.
Application Exception and System Exception are comparable. The only distinction is that an Application Exception refers to a mistake that has a technical basis, like an app that isn’t responding. In contrast, the shared language runtime throws a System Exception whenever a non-fatal problem occurs that can be fixed by user programmes. If this exception still cannot be recovered after several tries, you can alert the operations team.
Steps to Catch a System Exception:
- You choose the System under the Catch section. class exceptions.
- You will see this screen in the Drop Activity box after choosing the System Exception choice, where you can drop your further actions.