Changing variable Name of BusinessRuleException causes Variable Type in Throw Activity to change


#1

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:

  1. Create Variable Name BusinessRuleException of Type UiPath.Core.BusinessRuleException;

  2. 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

  3. Change Variable Name from BusinessRuleException to ValidationError

  4. Throw Activity no attempts to Throw new UiPath.Core.ValidationError

Current Behavior: Changing name of Exception Variable causes Throw Activity to change Variable Type

Expected Behavior: Only name change

Studio/Robot/Orchestrator Version: 2018.2.3