Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Handler to RETURN form calling procedure..
Message
De
23/03/2001 03:43:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Error Handler to RETURN form calling procedure..
Divers
Thread ID:
00487919
Message ID:
00487919
Vues:
35
How can I make my error handler return from the procedure that I called it
from for example

FUNCTION Mainloop
ON ERROR DOERROR()
*more stuff here line 1
*more stuff here line 2
*more stuff here line 3
*more stuff here line 4
ENDFUNC

FUNCTION DOERROR
**Do something
RETURN
ENDFUNC

So that if there is an error in MainLoop I exit this function after executing
the DOERROR code...

Maybe it easy but I just don't see it because the return gets me right back to the line the error happened on.

I.E. If I get an error on line 2 I don't want to execute line 3,4.

I suppose I can use a variable set in the doerror. But this is a simplified example my real code has thousands of lines and I don't want an IF
statement after every line...

Thanks!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform