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.
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.