Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Global error routine
Message
From
04/01/2000 13:34:36
 
 
To
04/01/2000 12:52:28
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00312532
Message ID:
00312565
Views:
15
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform