Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When is traditional, traditional?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00881665
Message ID:
00882740
Vues:
17
>>>> Try/Catch (though EPS gave our UG a great presenattion) is for projects more sophisticated than mine.
>>>
>>>Not at all. Try/Catch completely replaces Error() and ON ERROR. The only reason I would consider using either Error() or ON ERROR in VFP8 is if I need to support alot of backwards compatible code. Even then I'd avoid them if possible.
>>
>>Any quick situation scenarios you could share to highlight an advantage would be helpful!
>
>One DISadvantage of TRY/CATCH is that the RETRY command cannot be used there, if you need it. Technically it can be executed, but will not RETRY the code line you need.

The last time I used retry ... hmmmm... FoxBase/Xenix ERROR 108 "Lock File Header" for an append action! A VFP project I did a while back had to "special case" trap for a VBA or OCX error (and then ignore it). But on error was okay for that. In fact, subsequent coding may have cleaned it up and eliminated the necessity.

What I do remember about try/catch is that it seemed to be a substitute for something that should have been part of the coding standardse (incomplete housekeepping?). It may be helpful in large team projects where no single programmer is "totally" aware of the entire project. I work mostly alone, so I have to keep my stuff fairly simple!
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform