How to get a display name of activity that gave error using try catch

Hello,

Wrap your Activity inside a Workflow and use Invoke Workflow on Main, Then surround Main with a TryCatch.

Inside the Workflow you created, either do not surround it with a TryCatch or use Rethrow (not Throw because the Source would then be the Throw activity).

If your an exception occur in a Workflow itself invoked by another workflow (ex Main->Workflow1->Workflow2(ex), The sourrce of the exception would start to show you the Path the excecution took like under

`Invoke Workflow1 workflow: Activity Name

I havent found so far better way to refer to exact activity name using the exception object, of course you could hard-code on each worflow but i that would not a very scalable solution.

Hope it helps you.

You can also Refer to Badita post and example

Cheers

1 Like