Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When is traditional, traditional?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00881665
Message ID:
00882488
Views:
16
>>>In VFP 8 TRY/CATCH - robustness on steriods?:)
>>>>
>>
>>Hmmm, you could say that, but I view TRY/CATCH differently from ON ERROR. I'd use the former for exceptions as opposed to general error handling. For example, if you attempt to open a file exclusively but can't because some one else has it in use, that's an exeception, not an error.
>>
>>Why? Simply because the operating system is telling you this. There's nothing wrong with the code or the value passed to it. In contrast, if I attempt to open a file that doesn't exist, that's a coding error, since you should check to make sure that the file exists before you attempt to open it.
>
>It seems that a process that attempts to open a file in exclusive use by another is also a coding (logic?) error. I must admit, however, that I have never been proven right, only wrong:)

I think that if you take the time to consider it, you'll find uses for both exception handling (TRY/CATCH) and, of course, error handling (ON ERROR).
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform