Hello All,
I encountered the following issue:
Scenario:
Throwing a Business Rule Exception and changing the name of the variable of type ‘Business Rule Exception’ afterwards causes the Throw Activity to also change the name of the exception, causing validation errors.
Steps to reproduce:
-
Create Variable Name BusinessRuleException of Type UiPath.Core.BusinessRuleException;
-
Create Try/Catch Block
2.1 In Try Block, place a Throw Activity;
2.2 Throw a Business Rule Exception, e.g. new UiPath.Core.BusinessRuleException(“Error occurred”);
2.3 In Catch Block, introduce new catch BusinessRuleException
2.4 Assign ‘exception’ to BusinessRuleException
2.5 Log Message: BusinessRuleException.Message -
Change Variable Name from BusinessRuleException to ValidationError
-
Throw Activity no attempts to Throw new UiPath.Core.ValidationError