Hi,
If a browser operation (f.e. attach) is being cancelled, it throws following error:
PickTest has thrown an exception Message: The activity 'Launch Workflow Interactive' with ID 7 threw or propagated an exception while being canceled. Exception Type: InvalidOperationException System.InvalidOperationException: The activity 'Launch Workflow Interactive' with ID 7 threw or propagated an exception while being canceled. ---> System.InvalidOperationException: The activity 'Attach Browser 'iexplore.exe Google'' with ID 3 threw or propagated an exception while being canceled. ---> UiPath.Core.BrowserOperationException: Operation was canceled. ---> System.Runtime.InteropServices.COMException: Operation was canceled. at UiPath.UiBrowserClass.Find(String bstrSelector) at UiPath.Core.Browser.Find(Selector selector) --- End of inner exception stack trace --- at UiPath.Core.Activities.ScopeActivity.EndExecute(NativeActivityContext context, IAsyncResult result) at UiPath.Core.Activities.AsyncNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) --- End of inner exception stack trace --- at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) --- End of inner exception stack trace ---
This is not consistent with AttachWindow, TypeInto or other activities that can be cancelled normally.
Edit: Since an error thrown during cancellation is equivalent to throwing from Catch block or using TerminateWorkflow it bypasses immediate level TryCatch making it very awkward to design around.
Regards.