How to get the error message without try..catch from uipath?

Hi all, how can I get error message without try catch. Because it’s easy to found the source of error look like this:


number 1 is the error message from UiPath without try…catch and 2 is a message from try…catch. On 1 it’s very easy to found error. how can I get this message:“Click ‘;Product Default’:Multiple similar matches found.”

Thanks.

HI @jnfantasy4

You need to use the try catch if you need to get the error message becuase while executing the bot if any error occurs then the bot gets stopped immediately at that particular point and won’t go for further steps so using a try catch will help the bot to go further into the catch block and then it will execute the exception message over there and you can store that message or else you can display that message in any manner as per your requirement.

Regards

@jnfantasy4

Exception.Source.ToString to know which activity was throwing error

and

Exception.Message.ToString to know what is the exception message

Regards

On the Exception.Source.ToString just show this message:


Can’t get “Click ‘Product Default’: Multiple similar matches found” message.