Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global error routine
Message
De
04/01/2000 13:34:36
 
 
À
04/01/2000 12:52:28
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00312532
Message ID:
00312565
Vues:
14
>How is error handling done in a form/pageframe/control environment?
>
>I tried to call an error handler from the form.error(), but it didn't fire when the form's control crashed. When i moved the handler to the control's error() procedure, it worked.
>
>This application is usually running after i've left for the day, and would like to record errors in a file for examination later. I don't want to have to put code in every control's error routine. (i have overloaded the form way too much to make that feasible)
>
>How can i write one error handler and have it called by errors anywhere in the form, without specifically adding the call to each control's error() routine?

Hi Michael,

I don't know if this is feasible in your scenario, but you could write your error handler as a class and instantiate it in your application object or it could be part of your application object ( but some would say this would violate some aspects of OOP ). :-) At any rate, once the error object is instantiated or your error function(s) are part of your application object, then you would have to make a single call from the control(s)'s Error event. Any speciail processing for a specific error(s) for a specific control could be handled directly in the control(s)'s Error event. Not saying this is the only way, but it should give you food for thought. There may also be documents in the UTKB on this issue. There is also exdellent information on error handling on Doug Hennig's web site including documentation and examples.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform