Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want an error for VFP Open dialog
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00885697
Message ID:
00886004
Vues:
25
>Again, it's a feature. If you don't want it to occur, design accordingly.

George, i agree with pretty much everything you say, it's better to code defensivly. But features can be changed, thats why the fox team added try-catch functionnality but to IMO they forgot to include a couple of things in it.

Which of the following would you like better:
try
   Select MyCursor
   Scan
   ....
   EndScan
Catch
   ....
endtry
Or
try
   If Used("MyCursor")
     Select MyCursor
     Scan
     ....
     EndScan
   Else
     Throw "Something"
   Endif
Catch
   ....
endtry
The two method do exactly the same thing but i have 4 more line of code in the second one. Do you like to type for nothing?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform