Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's wrong with this code?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01121797
Message ID:
01121798
Vues:
11
This message has been marked as the solution to the initial question of the thread.
Remove 'loop' from 'catch'. Also I don't see where m.lcError is assigned a string value.

>
>I want to clean the temp directory on the applicaiton startup. I wrote this code:
>
>
>local lcTempDir, lnFiles, lnI, loErr, lcError
>lcTempDir = addbs(sys(2023))
>local array laFiles[1]
>lnFiles = adir(laFiles, m.lcTempDir + "*.*")
>
>for lnI = 1 to m.lnFiles
>    try
>    	delete file (m.lcTempDir + laFiles[m.lnI,1])
>    catch to loErr	
>	   	lcError = Log_Error(m.loErr)
>	   	=ErrorMsg(m.lcError)
>	   	loop
>    endtry
>next
>
>However, it gives me first file is in use error, that is caught and shown, but then it displayes "Unhandled structure exception". What is wrong here?
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform