Try catch log message for exception

Hi Guys. Is there any way of including the uipath exception into the log message activity inside the catch statement log message.

2 Likes

Yah of course
With this expression we can
β€œThe process got faulted unfortunately at : β€œ + Exception.Source.ToString + β€œ due to : β€œ + Exception.Message.ToString

Put this inside the log message activity inside the. Catch block
Cheers @bobby

7 Likes

Thanks man. Is there any easy way to write it to a notepad file?

1 Like

yah ofcourse we can assign this to a string variable and pass that as input to write text file activity
https://docs.uipath.com/activities/docs/write-text-file

Cheers @bobby

1 Like

Thank you for your help

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.