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).
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.
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.
For this, in the Catch section you would need to specify the following: exception.Source which will give you the name of the activity. You can also use exception.Message to get the specific error message.
So I’ve just seen that you are actually using these methods but not getting the expected results.
I tested your files and I get the correct activity name.
Maybe it’s something related to the version you are using.
Wow, that’s weird I must say. Indeed in your case the exception.Source actually gives what I want. That’s amazing, and exactly what I want
However that indeed begs the question how this is possible. Perhaps indeed a versioning issue. I’m currently running on UiPath Studio 2018.3.3 Enterprise Edition. Which version are you using?
The other thing I can imagine, is that it’s a setting. But I don’t yet see anything like that in the Studio.
I’m using UiPath 2018.4.3, however I do not think this is an issue with your version.
I checked in the forum and I’ve seen a couple of questions with regards to the same issue, please check the forum before creating a new question as you may find the solution in there