Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to trap errors with ON ERROR while error event in pl
Message
 
 
À
13/02/2002 14:33:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00618670
Message ID:
00619664
Vues:
20
>Hi Nadya.
>
>>I don't understand, where this code should be put. Say, we have several applications, which are class based or form based and use their own Error method. These applications can invoke UDFs, what in turn have something like
>>lcOldError = on('error')
>>on error do mycustomUDFProcedure
>>some code
>>on error &lcOldError
>>
>>So, are you suggesting, what these applications (or Error form class, which they are based on, should have these lines at the top of Error method)?
>
>We're suggesting either that the Error method of the object calling the UDF have this code in it or (a better choice) is to call a UDF wrapper class rather than calling the UDF directly, and the UDF wrapper class would have this code.
>
>Doug

The first approach would be easier to adapt in our current situation. Our BaseForm class doesn't have Error method coded. There are few applications, which may have Error method coded in them, but let's them deal with this problem by themselves. And finally, we have several important components, like Querier, XForm, BtCrit, Reporter, which are based on the special class ErrForm.
I guess, the code you suggested, could be added there...
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform