Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nesting error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00481455
Message ID:
00481456
Vues:
9
>I am trying to save the following error routine code in my method and I keep getting an error saying "nesting error". The code is as follows
>
>sour = k+f &&  source location of files defined
>dest = l+c &&  destination location of files defined
>* Save the original error handler
>lcOldOnError = ON("ERROR")
>* Issue ON ERROR with the name of a procedure
>ON ERROR DO errhandler  with error(), message()
>rename (sour) to (dest)
>ON ERROR &lcOldOnError
>	
>procedure errhandler
>                                local aErrInfo[1],qt
>				aerror(aErrInfo)
>				qt = aErrInfo[1,2]
>				qt = qt+' '
>				messagebox(qt+f,0,'error moving tofile')
>				continue_on = .f.
>				release aErrInfo
>endproc
>
>
>Can I not go to error handling paragraph call errhandler if I code it as above in one of my methods?
>
>Thanks
>
>Nick Patel

Nick,

VFP doesn't allow nested function/procedures in methods.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform