Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping an Error
Message
 
 
To
23/04/2000 10:21:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00362580
Message ID:
00362587
Views:
18
Errors follow the call stack and not containership. In other words if the error occurred in a textbox on your form it will fire the textbox error event and if no code is there follow its class roots (class hierarcy) not its parent roots (containership hierarchy). At the first place it finds code in the Error Event that code will begin handling the error. This means it will travel up to the VFP Base Class via inheritance. Doug Hennig has an excellent example available on stonefields site in the public section. His work that appreared in FoxTalk is also available via MSDN online. Anyways you have to call the form's error event directly or with This.Parent.Error to call up the containership chain.
You said the error occurred in the form's "child method". If you mean a method of the form then the form error event should fire. BTW, if no Error code exists in any error events of the call stack your ON ERROR routine will fire if there is one or you will get the default VFP error dialog.
HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform