How can I suppress the popup workflow was aborted by the user by Global exception handler?

Hi All,

Just I tried Global exception handler in my project.
whenever any error encountered, after performing a number of retries it will generate a popup, workflow was aborted by the user.

Is it fine if this popup generated in a production machine?
or do I need to suppress that popup?

Hi @Karun!

Global Handler will alway throw exception popup so you may want to use ‘try/catch’, if error occurs it will be catched and in that ‘catch’ you can handle error however you want.

Hope this help! :smiley:

2 Likes

Hi @Karun

Just remove the aborted by user message from the ‘else’ part of the global handler and surround your whole project with a try catch.

You will get no popups and the bot will exit gracefully.

2 Likes

@Karun did it work?

You mean i need to put global exception handler in a try catch block

Thanks @Raghavendraprasad for your reply

removing abort else part is ok understood.

If i need to put entire project in try - catch what is the use of global exception handler

1 Like

Global handler is for retry and then capturing the activity error and failure (also logging as needed)

Try catch is the ‘try’ an action and ‘catch’ any exception that occurs. There is clear distinction. May I ask what are you confused about? :slight_smile:

Regards

2 Likes

I am not understanding the difference here both are doing the same job where is the distinction?

Simply I will put entire my project in a try catch and i do logging and recovery in catch

Great you will do the following -

but, how will you retry the items you want to attempt again?

1 Like

Thanks, @Raghavendraprasad I understood
I can’t achieve retry from try catch.

and one last question, pls tell me how will u do exception handling in your projects
will u put try-catch for each activity?

in my case I put my entire project in one try - catch only in catch block I mentioned exception type as Exception and i am writing exception.message into a excel log file, functionality-wise its working fine but is it a good way or not?

Well @Karun

it depends. There are layers (Application, logic, data processing etc in projects) so you can bubble up the exception from whichever workflow that you want to extract the exception.message from using ‘throw’ and re-throw it until you reach the ‘Main’ file.

You can have only one try catch but it is not a best practice because you have no option to trace/debug/log it unless you do it using bubbling.

Thanks @Raghavendraprasad

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