Question on SystemException.Source

I have a question on using SystemException.Source and I’m hoping I’m using it wrong. I’m capturing the exception itself as well as the source in an outbound email. However, the source itself is … well … rather useless most of the time. By that I mean this example:

Exception Source: Invoke Workflow File: Invoke Workflow File: Invoke Workflow File: Invoke Workflow File: CV Extract Table - Table

So the source is a stacked “Invoke Workflow File” reference. Doing a little following the trail and knowing what is run in what subflows, I can get an idea of what that source might be but multiple stacked references to Invoke Workflow isn’t helpful.

Is there anyway to have it instead show the physical workflows that were called via Invoke Workflow ? (debugging these makes me miss MicroFocus Operations Orchestrations at times …)

I have seen several questions to this question on the UiPath Forum but I can’t seem to find a consistent answer to what I’m seeing myself.

There is a top level TryCatch being used in the standard REF template. This is specifically the one on the Process Transaction state block. In there, there are two simple Catches. One for BusinessRuleException and another for Exception. Each runs the same workflow sending out the email both using SystemException.Source.ToString.


Exception object has other properties, so if you need you can add and use different combinations. You can check here for more information Exception Class (System) | Microsoft Docs.

Additionally, you have to consider where the try-catch is used, because in your situation the try-catch has an “invoke workflow” activity, so the source obviously is “invoke workflow”. But, if you check also the Exception.Message or Exception.StackTrace, you will find more information. Or also if you run the project in Debug Mode, UiPath Studio will show the exact activity that generates the exception and the entire stack.

Regards, Gio