Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
On Error
Message
De
30/06/2003 13:04:44
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00805374
Message ID:
00805377
Vues:
13
>Hi Everybody,
>
>When the program enters a routine, I want to save the default procedure or whatever for the:
ON ERROR
Then, when it returns from the routine, I would like to set
ON ERROR
to its default value before entering that routine.
>Notice: the default is a procedure(which I don't know the name), which is not the VFP default error handler.
>
>Thank You,
>Ali

Ali,
&& save on error
local sError
sError = on('error')

&& your stuff
Private HadError
HadError = .f.
on error HadError = .t.

&& do something
do
case
case HadError
   && something went wrong

endcase

&& reset to original value
on error &sError
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform