Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TRY...CATCH...FINALLY to reprocess some code
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01345690
Message ID:
01345726
Vues:
10
Hi Mark,

Yes, you could run it several times like this:
For lnAttempt = 1 to 10
	Try
		llDone = .F.
		* Block start
		? m.lnAttempt
		If m.lnAttempt < Rand()*10
			Error 1
		EndIf
		* Block end
		llDone = .T.
	Catch
	EndTry
	If m.llDone
		Exit
	EndIf
EndFor
However, if there's a problem it might be better to find out what is causing the problem and why you get an error, at all.
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform