Remote Exception wrapping issue

RemoteException wrapping UiPath.Core.BusinessRuleException: Business Rule Exception message goes here
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)

I am getting this message when using a Throw with a BRE inside a trycatch block. any help would be appreciated.



Could you please help me screenshot of the same. Need to check once how you passed message into Throw activity.

Hey @jmcentee1488

In the throw activity, how did you specify the exception? Is it something similar to below?

New BusinessRuleException(“Your exception”)

Here are the screenshots. thanks

1 Like


Seems everything is fine. Hope you put all the flow into TryCatch block.

Could you please run the process in Debug mode and check it once.

Here is additional info from the studio log file.

21:52:48.2966 => [ERROR] [UiPath.Studio.exe] [1] Error while getting window handle: System.ArgumentNullException: Value cannot be null.
Parameter name: window
at System.Windows.Interop.WindowInteropHelper…ctor(Window window)
at UiPath.NativeWindow.GetIntPtr(Window window).
21:52:52.1446 => [ERROR] [UiPath.Studio.exe] [79] The process cannot access the file ‘C:\Users\jmcem\OneDrive\Documents\UiPath\Process_Vendor_Invoices_by_City\System1\Compare Results with AllVendorDisplay.xaml’ because it is being used by another process.
21:55:54.3198 => [ERROR] [UiPath.Studio.Shared.Logging.OutputLogger] [23] Throw if Vendor Data Does Not Match: Data not sufficient

23:16:42.3052 => [ERROR] [UiPath.Studio.exe] [83] RemoteException wrapping System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> RemoteException wrapping System.Exception: Cannot evaluate ‘Throw’ at current context. —> RemoteException wrapping System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:
‘VisualBasicValue’: Compiler error(s) encountered processing expression “Throw”.
Expression expected.