Uipath Throwing exceptions

Business Exceptions

Business Rule Exception or BRE: An exception manually triggered by the developer using the “Throw” activity. The basic syntax of the activity’s input is:

new UiPath.Core.BusinessRuleException(this is my reason message”)

The developer should throw BREs when he needs particular information to be available in order to continue the process, but, upon testing, discovers it is not available.

Application Exceptions

An exception that is triggered automatically by activities that fail, or manually by the developer when a condition pertaining to the application environment is not as was expected (for example, inputting data into a program we always expect success if we have the data needed in a correct format, but upon submitting the data we receive an error. We can capture the message and issue an application exception if retrying may solve the problem). The basic syntax of the throw activity is

new System.Exception(this is my reason message”)

There are many types of exceptions.