Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping an Error
Message
 
 
À
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:
00362605
Vues:
19
John

I'm here in DeSoto for Easter.

If you can't put code in that will adequately check for the error condition before it would occur then I'd just throw the error directly from the button to the form:

Save.Error:
LPARAMETERS nError, cMethod, nLine
ThisForm.Error( nError, cMethod, nLine, this )

Add this as a parameter so you can check what object threw the error.

You could alter all of your lowest level classes' Error() methods to pass the error on up to this.parent.Error() but this does require you to "buy" into this method of error delegation on a global basis.

>
>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?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform