Capture errors for each activity during runtime

Hello all, trying to capture errors for each activity during runtime . I added trycatch block for each activity along with screenshot of activity and logmessage. if activity fails it should fall into catch bloack and write a add row in dt with error message. or it will add activity passed in dt . Just wanted to check if there is any other way or approach I can follow to capture errors/failures in spreadsheet for each activity during runtime? Please help

PS: not using orchestrator

@r0818

You can try using global exception handle in event of exception and log your details and then continue …that way you need not have try catch on each activity

Hope this helps

cheers

can you please help me with any sample script please

Hi,
Please, follow this link for more information on Global Exception Handler:
https://docs.uipath.com/studio/standalone/2022.10/user-guide/global-exception-handler

I hope this helps. If it does, kindly mark as solution.

@r0818

Its a standalone xaml that you have…you need not incoke it anywhere…right click on the main file and select global exception handler and a xaml will be added to the project…which whenever an error occurs first it gets automatically tirggered…inside that you can choose option to continue…retry or abort the process

Check the video below

Cheers

1 Like

Hi

Global exception handler is the best one suitable for this scenario

Here u go with an example of how to use this

https://docs.uipath.com/studio/standalone/2022.10/user-guide/global-exception-handler

Cheers @r0818

1 Like

I understand, thanks for sharing. I will try

1 Like