As you may have experience during the whole automation running/process we may have any type of exception anywhere, I mean anywhere and many of them. Let’s say I’m trying to get the last one only, the one from all try/catch that finally stopped the bot just like when we see it on the ‘output’ panel.
•How can you get/email that ‘very last’ exception that stopped the bot?
As usual I have been researching (link below) and checking some videos from uipath.com/developer or even some articles here at the forum, gets closer but no specif or ‘FINAL’ solution for it so I had to bring the question back again.
Agreed - It is very tedious to check for each and every activity failure . So In practice , how we can implement is
we divide the automation into logical xamls . lets say xaml1 , xaml2 , xaml3
2.Now we have process .xaml where we keep three xamls once by one.
we implement- try catch on each on xaml and from the exceptions - we rethrow the exception.
So when there is an exception in any xaml file - the exception is thrown to process.xaml .
Exception handeling of process.xaml decides on the basis on exception type - how do we handle this. So if the exception type is System exception - we send email to developer … if BE - then send email to Business.
Now , In the Above setup : •How can you get/email that ‘very last’ exception that stopped the bot?
We Can write custom logs -
At the beggining of the automation - we create a Textfile called Logfile and for everystep - we keep appending the Logs.
in exception also - we append the log file with exception details / activity name / source . - This info at the same time can be sent in mail also.
–This way you can read the log file and say yesthe bot broke at step 5.