cancel
Showing results for 
Search instead for 
Did you mean: 

3.2.1 Scenario 6- Proper Exception Handling

SamLima
Level 7

"Recover/resume/throw blocks for exception handling are highly flexible, but if in any case a second exception is
thrown after a recover but before a resume, Blue Prism will simply perform a fatal exception and terminate
execution. As part of best practices, special care needs to be taken to ensure that any operations inside exception
handling have minimal risk of triggering this case and ending the possibility of error recovery."

in bp Advanced Consolidation Exercise, was mentioned that may an exception occurs after recover but before resume, how could this happen?could anyone please explain this to me?



------------------------------
Sam Lima
------------------------------
1 REPLY 1

ManpreetKaur1
Level 8
Hi @SamLima,

Let's take an example- Suppose you are trying to launch a website using object studio and you have already performed exception handling at the object level to try 3 times and if it fails, it will throw the error of 'Website not launched'. Now the error will be bubbled up to the process studio where you have used recover stage to capture the exception. Generally, in any exception scenario, post recover stage, we put a multi-calculation stage to fetch the Exception details, exception type and exception stage and after that put resume stage to resume from the error​.
In above scenario, if you forget to put any calculations in calculation stage or intentionally throw an exception using Multi-Calc stage, then you can see what happens next. The process will terminate since already there was an exception coming from Object studio and now, additional exception came up before the resume stage, which caused 2 exceptions in the stack and hence the bot will terminate.

Hope this helps.

------------------------------
Manpreet Kaur
Manager
Deloitte
------------------------------