Quantcast
Channel: UiPath Community Forum - Topics tagged error
Viewing all articles
Browse latest Browse all 4384

Get Display Name of Activity within Try Catch mechanism

$
0
0

@ColinOtto wrote:

Hello everyone, I hope someone can help me with the following.

I’ve got a a large number of mouseclicks and keyboard actions within a Try Catch block. I’m doing this because I know the application the robot interacts with sometimes is unresponsive or a button might change. Currently, I can get things like the exception.Source and exception.Message when an error occurs. I let the robot send this information in an e-mail to myself and colleagues. However, what I would really like to be able is to get the Display Name of the Activity itself where the error occured. This is because I have a lot of activities and I would like to pinpoint exactly which one faulted. The info I’m currently getting leaves me guessing which one it is (the activities are similar, but not the same).

Now I’ve seen other forum posts that touch this issue. For example: Activity display name in Try-catch, TryCatch - Get activity: "DisplayName", Obtain Sequence's DisplayName.

Some of them seem to be saying that it’s impossible to get the Display Name. However, I have made an example workflow that shows that this information is at least available in the standard output of UIPath Studio. Still I can’t seem to get this info in a variable or Message Box (and ultimately let the robot send this info to myself via e-mail). See the attached two workflow files. When you run the Main, the invoked Click workflow will run into an error. Now you can see in the screenshot below that the Display Name of the activity is in the standard output, but I can’t seem to retrieve it via the exception handling.

Main.xaml (6.8 KB)

Click.xaml (5.1 KB)

Is someone able to get the Display Name of the Activity - in this case “Click on Button X” - shown in the Message Box for me? I can pick things up from there.

Posts: 9

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 4384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>