Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Try...catch...finally
Message
 
To
26/10/2002 17:56:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00715709
Message ID:
00715820
Views:
14
>>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.
>
>Thanks. If you don't really know the answer, well, I am of course still grateful for your trying. As for the usenet, unfortunately I can't access that right now.
>
>Hilmar.

Hilmar,

Here is a reference to the message that appears to answer the question:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=ulvaQDZdCHA.776%40tkmsftngp08

The issue seems to be the cases where an error occurs but is not handled, or the exception is rethrown. I think I was wrong in my previous speculation about what happens when the end of a CATCH case is reached. This does fall through to the command after the ENDTRY, I believe.

Mike
Montage

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

Click here to load this message in the networking platform