Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a VFP Error Handler
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00014534
Message ID:
00015066
Views:
32
>Thanks Dave. I've used fpwerror for VFP also, but I'm a little suprised not
>to see a VFP error handler out there. In all fairness im sure that there are
>many more errors to trap for and recover from.

The thing is, VFP uses a completely different error model than 2.6 and earlier. While you can still use the old style of error handling, VFP allows you to put the error code right where it needs to be. For example, your "Save" button can have an Error method that handles only the errors the button would incur.

Mac Rubel wrote some very good articles on the subject in FoxPro Advisor this fall, and I was lucky enough to hear him speak on the topic. He believes that the error handling should be as close to the error as it can. He'll call the parent class of the control where the error message occured, until he gets back to the top level, and then he'll call this.parent.Error, up to the Form/FormSet level. An error that can be handled at a lower level shouldn't be passed upwards....
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform