Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need good practice suggestion
Message
De
26/10/2008 11:49:37
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01356528
Message ID:
01357230
Vues:
24
>>I'm not aware of any slowdown caused by TRY...ENDTRY that would warrant not to use it when necessary.
>>
>
>Good to know. Maybe I have read about slow TRY/CATCH on the .NET forum. Thank you for your input.


Yeah, you probably heard it from me on the .NET forum, but I should clarify that perception: there is no performance hit at all, unless there's an error that's caught. My point about where to use try/catch is that it shouldn't be used to catch errors that you can test for some other way. Testing for a potential error beats allowing a try to catch the error, performance-wise ... unless it's something that is unlikely to occur.

At least that's the case in .NET ... I can't remember if it's the same in VFP, but I suspect that it is.

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform