Skip to main content
Solved

Exception Handling

  • August 1, 2023
  • 1 reply
  • 136 views

Forum|alt.badge.img+5
  • Navigator | Tier 3
  • 11 replies

Whats the validity of initial TRY/ CATCH Block? Will it be in use even after the next TRY/CATCH Block?

 

TRY - 1

….

TRY - 2

 

CATCH - 2

 

ACTIONS 1 

 

CATCH - 1

 

Will actions 1 will be handled by TRY 1? I remember reading somewhere that the validity of first TRY ends when the next TRY comes.. I understand that the TRY 2 is only for actions within that block

Best answer by rpadude

TRY - 1

….

TRY - 2

 

CATCH - 2

 

ACTIONS 1 

 

CATCH - 1

 

Will actions 1 will be handled by TRY 1?

Yes, TRY 1 will execute the bot actions that are within the nested scope of TRY 1, including TRY 2 bot actions and ACTIONS 1.  If TRY 2 block / bot actions throw an exception, it will be caught by CATCH 2, if this block does not re-throw the exception, it will also continue and invoke the ACTIONS 1, but if does re-throw the/a new exception, it will essentially skip over ACTIONS 1 block and go straight to CATCH 1 and do not collect 200$

 

View original
Did this topic help answer your question?

1 reply

Forum|alt.badge.img+1
  • Cadet | Tier 2
  • 2 replies
  • Answer
  • August 2, 2023

TRY - 1

….

TRY - 2

 

CATCH - 2

 

ACTIONS 1 

 

CATCH - 1

 

Will actions 1 will be handled by TRY 1?

Yes, TRY 1 will execute the bot actions that are within the nested scope of TRY 1, including TRY 2 bot actions and ACTIONS 1.  If TRY 2 block / bot actions throw an exception, it will be caught by CATCH 2, if this block does not re-throw the exception, it will also continue and invoke the ACTIONS 1, but if does re-throw the/a new exception, it will essentially skip over ACTIONS 1 block and go straight to CATCH 1 and do not collect 200$

 


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