Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global error routine
Message
 
 
À
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:
00312569
Vues:
13
Michael,

If there is no code in the Error method anywhere along the inheritance tree of an object the ON ERROR handler will trap it. If there is code in the inheritance tree it will trap the error. The containership of the form doesn't automatically mean that all of it's controls will route their errors to the form error.

If you put code in your lowest level subclasses Error method then each control will catch it's own errors. By putting it in the subclass you don't have code it in every instance. I use a udf and the error method in my baseclasses is just: ObjError( this, nError, cMethod, nLine ) In the ObjError() udf I can do whatever I want with the error. In ObjError you could use the object reference and pass the error on to the parent containership object.

>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?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform