Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Handling in Scan Endscan Loop
Message
De
29/01/2014 13:33:09
 
 
À
29/01/2014 13:30:26
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01592536
Message ID:
01592586
Vues:
46
>>>>Because it is a new thing you have to learn. Why should I be forced to learn something new when an ON ERROR can be made to work just as well as it did back in the dBASE days?
>>>>(or at least that's how I interpret reaction I've seen from some folks)
>>>
>>>I agree that learning something new just because it's new is something we're forced to do much too often.
>>>
>>>Yes, ON ERROR can be made to work as it did in the the DBASE days. but you might want to look at again at TRY.. CATCH.
>>>It can do what what ON ERROR did and more and save you a lot of effort while doing it.
>>
>>I have been able to reduce the number of lines in a very critical routine from nearly 50 to just 10 lines, by using Try-catch.
>
>True, I had such cases as well, but OTOH try-catch will screw your debugging if it isn't localized enough. If an error occurs three levels down the call stack from the level where you have the try-catch, your aStack() won't show how did you get to the place where the error occurred. For it to be effective, it has to be rather local. Learned that the hard way, after many hours in the debugger.

Also true, I normally only have a few lines between Try and Catch.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform