Throw activuty is not working well and it throws an execution error

Hello Everyone,

I have process state in which I am calling process.xaml and in process.xaml I am calling child1.xaml and under child1.xaml I am calling grandchild. xaml. I have a Throw activity in grandchild.xaml and I want to catch this error in Process.xaml’s catch block. I have try-catch in process.xaml. Throw activuty just gives me an execution error at grand child process level, stops the bot immediately and does not go to catch block of the process.xaml. Please help

23.10.3+Branch.support-v23.10.Sha.ceeb2a4c480c2b7a4d12600ae5d39a26b6930830

Source: Invoke Process workflow

Message: S******5 This case Id is not pending for the verification

Exception Type: System.Exception

System.Exception: S*******5 This case Id is not pending for the verification at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
— End of stack trace from previous location —
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hi @Chand

Can you try to turn on ContinueOnException then Debug run?

Or Try clicking Run File or Run and check if exception is getting catched.(not Debug)

Regards

@Chand,

How you are throwing the error? Because as per description you mentioned, throw should throw exception to it’s parents till process.xaml.

Thanks,
Ashok :slightly_smiling_face:

Can you show us the Try Catch, sounds like you didnt set the catch up correctly.

YES. That’s the point. It should work

Try catches do work. They are some of the oldest activities and are rock solid.

Its most likely you use it incorrectly so please share some screenshots as requested.