Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Try...catch...finally
Message
 
To
26/10/2002 17:17:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00715709
Message ID:
00715816
Views:
15
>>Hi Hilmar,
>>
>>I was wondering about that, too. You can find some discussion about it under a recent thread on microsoft.public.fox.programmer.exchange. Basically, as I understand it, the FINALLY steps are performed after the CATCH steps (as well as the non-error case). Code placed after the ENDTRY, i.e. outside the TRY ... ENDTRY block, is not executed for the CATCH cases.
>
>Why would it not be executed?

Thank you for asking. Something was bugging me about my understanding of this, and your question makes me see that I'm still a bit confused. I don't yet have a clear picture about flow of control in the CATCH cases. Where does a RETURN go? What about the RETRY command? What happens when the end of the CATCH case is reached? If it falls through to the command after the ENDTRY, we're back to the question of why we need a FINALLY clause. It may be that the error is passed along to the default error handler at the end of a CATCH block, as opposed to falling through to the step after the ENDTRY, so the FINALLY gives it one last chance to clean up before departing from the containing procedure.

Perhaps a careful reading of the Usenet thread I mentioned, which includes documentation excerpts, would clear this up, but I must confess that I haven't spent much time studying this closely. Now, I should be quiet and wait for an explanation from someone who really understands.
Montage

"Free at last..."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform