How to get Exception source "Activity Description name"

uiautomation
studio
exception

#1

Hi,

How to get the exception source highlighted in the below mentioned screenshot, in catch block to identify in which UIPath activity throwing the exception.

Regards,
Siva


Activity name in exception
How to get exception message and other exception info as a variable?
#2

Hey @siva

You can get the source by using “exception.source”.

please find below screenshot:

Regards…!!
Aksh


#3

exception.Source not giving the “Activity Description Name”, it always showing “System.Data”.


#4

Please check the post below and check if it helps

Regards,
Sachin Desai


#5

Thank you so much, This works fine :slight_smile:


#6

That is the same thing. why not working earlier?


#7

hey its not working for me
It shows only UiPath.core.Activities


#8

Any solution you got for the issue? Even i am facing similar issue.


#9

Hello Folks,

I guess we need activity description in exception for detailed logging. It seems till now only we can get workflow names not the activity names under catch using exception.source.

Here is an approach, kind of simple. Create Main level variable (Ex. ActivityTracker), update this variable where you are doing application level interactions.
Keep couple of things in mind:

  • Update this variable before the activity
  • This approach can be used either as practice to whole process or not
    Example is attached. DetailedLogging.zip (4.4 KB)

Consider this example is to show error handling, so simple step is failing and you can see activity name is tracked in Catch block.
If you want to remove that error, in selector change from aaname=‘Sezarch’ to aaname=‘Search’


Exception : Get Activity Name
#10

The issue is strange. What @Sachin_Desai has mentioned worked when the exception is in different workflow.
But if the exception is in same workflow where the Try-catch block is, then exception.Source shows something like “UiPath.Core.Activities” instead of showing the activity description.

This is strange.


#11

This is in fact happening. Is there any solution other than using invoke inside Try Catch?


#12

Guys, this bug is serious and annoying. Can anyone help or confirm this behaviour ?

Please find attached a pratical example: TryCatchBugs.zip (20.2 KB)

Thank you.


TryCatch Bug with exception.source
#13

I had faced this problem, handled this in a different way, for every screen I have created 2 workflows, parent & child, in the parent work flow I have put try/catch, very little & error free code, in the child workflow write the entire logic. This way it is showing me the exact error source.


#14

Another option is just create a variable strSource and assign a meaningful activity name as string before the actual activity. But these are very cumbersome process.

UiPath should resolve this bug. @ovi and @Sachin_Desai must take a look at it.


#15

Hi Joasantos, same issue here. For now the only solution is to remove the trycacth (or use a rethrow) to let the studio outline the activity that was in error …