G
gemel
I wish to implement error recovery using the Exception mechanism
However, I'm not sure I fully appreciate some of the detail in which
this works.
The code that contains a potential error is included in the Try block.
The Catch block is used to catch this exception. The Finally block
will then execute after the Exception has been handled. My questions
are:
1. If the Exception is caught in the Catch block is this referred to
as 'swallowing the exception'
2.If the Exception that is raised is not caught in the Catch block
then will the code in the Finally block still be executed before the
Exception processing transfers to the next higher Catch block.
3. If the Exception is successfully caught in the Catch block will it
be possible to try to recover from the error and do the Try block
again. That is, can I put the Try/Catch block in a loop and then use
my code to determine when to exit from the loop.
Regards
John L
However, I'm not sure I fully appreciate some of the detail in which
this works.
The code that contains a potential error is included in the Try block.
The Catch block is used to catch this exception. The Finally block
will then execute after the Exception has been handled. My questions
are:
1. If the Exception is caught in the Catch block is this referred to
as 'swallowing the exception'
2.If the Exception that is raised is not caught in the Catch block
then will the code in the Finally block still be executed before the
Exception processing transfers to the next higher Catch block.
3. If the Exception is successfully caught in the Catch block will it
be possible to try to recover from the error and do the Try block
again. That is, can I put the Try/Catch block in a loop and then use
my code to determine when to exit from the loop.
Regards
John L