Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get error handler?
Message
De
01/09/1998 17:09:38
 
 
À
01/09/1998 16:52:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00132084
Message ID:
00132095
Vues:
15
Is the original error handler set using ON ERROR? If so, you can use Josh's suggestion in the following manner:
PROCEDURE MyFunction
LOCAL cErrorHandler
cErrorHandler=ON("ERROR")
ON ERROR DO newhandler   && Change
.
.
IF !EMPTY(cErrorHandler)
   ON ERROR &cErrorHandler
ENDIF
RETURN  && Back to calling program
You might want to look at using the Error event instead of ON ERROR.

>I need to temporarily set to error handler in a function. I would like to set the handler back to whatever it was in the calling function, but I can't find a way to get VFP5.0 to tell me what the original handler was. I'm sure it's simple, but I can't figure it out.
>
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform