Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error handling
Message
 
À
14/01/2001 08:54:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00463508
Message ID:
00463556
Vues:
10
Untested suggestion
ON ERROR DO errhand WITH ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
CREATE CURSOR MyError I(errdate d,errtime c(10),errdesc m)
....
....
....
PROCEDURE errhand (merror, mess, mess1, mprog, mlineno)
on error
append blank in MyError
repl MyError.errdate with date(),MyError.errtime with time(), ;
    MyError.errdesc with trans(merror)+chr(10)+trans(mess)+chr(10)+trans(mess1)+chr(10)+trans(mprog)+chr(10)+trans(mlineno)
messagebox([Error happend])
ON ERROR DO errhand WITH ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
return
>Hi,
> How could I have ON ERROR DOError() and fire object.ERROR() at the same time?
THe on error and control Error could fire the same error handler.
>
>Once untrapped error occured in method, I would like to save all of value the local variable into MEM file. I tried to issue SAVE TO statement in object.error(), however, since the variables are local, ERROR event failed to save the variables. Therefore, I place SAVE TO statement in every method with ON ERROR.
>Yes, it work but it is not IF there are codes in ERROR event.
>How to "fired" both?
>
>Thank you
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform