Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Error Handler to RETURN form calling procedure..
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement