Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error event
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01002297
Message ID:
01002682
Views:
27
>If you don't have a code in Error event of the control and error occurs during the execution of some part of your code the form error event is called. If you don't have a code in error event of the form then Error handling routine seted by ON ERROR is called. If you don't have ON ERROR ... The default VFP error handler is fired.

Borislav,

I believe you are mistaken: if an error occurs in code for a control that has no Error method code, it does not automatically escalate to the form's Error event. That would have been a better design choice for VFP (IMO), but it doesn't work that way. One way around this problem is to avoid putting any code likely to encounter errors in a method of the form, and let the control invoke this form method, instead of doing it inline. Another solution would be to add some logic to the global ON ERROR handler to check for _screen.activeform. There are still more options, of course.

Mike
Montage

"Free at last..."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform