# How to log the display name of the activity where an error occurred inside 'Try Catch'

**URL:** <https://forum.uipath.com/t/topic/5776146>\
**Category:** ナレッジベース\
**Tags:** studio\
**Created:** [September 11, 2026, 3:16am UTC](https://forum.uipath.com/t/topic/5776146 "2026-09-11T03:16:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [September 11, 2026, 3:16am UTC](https://forum.uipath.com/t/topic/5776146/1 "2026-09-11T03:16:38Z")

</div>

**Question/Problem**

Is it possible to log the display name of the activity where an error occurs within a “Try Catch”?

**Resolution**

Three methods can be considered:

■ Method 1: Global Exception Handler

The steps are as follows:

1. In the Ribbon, select the “Design” tab and choose “New” \> “Global Handler” to create a global exception handler by entering a name.
2. In the global handler workflow, an argument called “errorInfo” is automatically generated. Please check the argument panel.
3. By specifying “errorInfo.ActivityInfo.Name” in activities like “Log Message”, you can log the name of the activity that threw the exception.

For reference: Global Exception Handler  
Relevant section: Global Exception Handler  
[Studio - Global Exception Handler](https://docs.uipath.com/ja/studio/standalone/latest/user-guide/global-exception-handler)  
— Excerpt —  
“Use the ActivityInfo property of errorInfo to obtain the name of the activity that threw the exception and display it in the [Output] panel.”

■ Method 2: Using “Try Catch” + “Invoke Workflow File” to utilize “exception.Source”

In the configuration where “Invoke Workflow File” is placed in the “Try” of “Try Catch” and catches exceptions that occur in the called workflow in the “Catches”, the display name of the called activity may be stored in “exception.Source”.

The steps are as follows:

1. Place “Invoke Workflow File” in the “Try” of “Try Catch” to call a separate workflow for the process you want to detect errors.

2. Specify the type of exception (e.g., System.Exception) in the “Catches”. By default, exceptions can be referenced with the name “exception”.

3. Specify “exception.Source” in activities like “Log Message”.

For reference: Try Catch  
Relevant section: [Examples of Using the Try Catch Activity]  
[Activities - Try Catch](https://docs.uipath.com/ja/activities/other/latest/workflow/try-catch)  
— Excerpt —  
“Due to technical limitations, when an exception occurs within the invoked workflow, the source of the exception reported in the Try Catch scenario may differ.”

The limitations are as follows:

- It is limited to exceptions that occur in the target of the “Invoke Workflow File” and does not retrieve the display name of activities placed directly in Main.xaml.
- There have been reports of “exception.Source” containing values other than the activity display name, such as “System.Activities”, and the behavior may differ depending on the version of Studio and execution form (executing from Studio / executing after publication).  
For reference: Exception.Source is displayed as System.Activities  
[Exception.SourceがSystem.Activitiesと表示されてしまいます](https://forum.uipath.com/t/exception-source-system-activities/709716)

If you adopt Method 2, it would be appreciated if you could check in advance if the expected display name can be retrieved with your version of Studio and actual execution form.

■ Method 3: Using “Try Catch” + “Assign” to manually retain the activity name  
If you do not use a global exception handler and only target some activities on Main.xaml, you can manually store the activity name in a variable.

The steps are as follows:

1. Create a string type variable to store the activity name.
2. Place an “Assign” activity just before each activity you want to target and specify the variable from step 1 as the “left side (To)” and the corresponding activity’s display name as the “right side (Value)”.
3. In the “Catches” of the “Try Catch”, log the variable from step 1.
