Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping an Error
Message
De
23/04/2000 11:53:09
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00362580
Message ID:
00362591
Vues:
14
Hi John

Thanks for the reply. How is it in St Louis? It's damp down here in the Bluff...

The error in this case is in a class method that is called by a command button on a pageframe of a form...

I think that I understand more about what confused me ... If the error follows the call stack then if there is no error routine in the command button then it looks in the class for the method called and finding nothing there goes to the on error by-passing the forms error event???

How do I pass the error up the continershi? Is that possible with out alot of code?

Thanks

>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform