Skip to main content
Solved

Priority of task stop commands in error handler (catch) and action commands in error handler (finaly)


Forum|alt.badge.img+1
  • Cadet | Tier 2
  • 4 replies

If I put another action command(For Ex: close excel, deleat file etc...) in error handring [Finaly] and stop taskbot command in error handling[catch], Which one takes precedence?

In my opinion stop task command would take precedence.

Best answer by Aaron.Gleason

Yes, Task Bot: Stop would take precedence as it is not throwing an error to stop the automation.

View original
Did this topic help answer your question?

4 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 539 replies
  • Answer
  • January 9, 2025

Yes, Task Bot: Stop would take precedence as it is not throwing an error to stop the automation.


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 4 replies
  • January 10, 2025

thank you Mr.Aalon.

One more question.

The bot I am currently creating has the bot exit command in the error handling[catch], but should I put it in the error handring [Finaly].
I want to stop the bot when an error occurs.


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 539 replies
  • January 10, 2025

That depends on the bot logic. Generally, I only use Finally to organize my code. Since the Finally always executes, it's the same as putting actions after the Try... Catch block. 


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 4 replies
  • January 10, 2025

Thank you for  the ideas. I’ll refer to them.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings