Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class Design Question
Message
De
29/09/2005 01:45:13
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01054128
Message ID:
01054347
Vues:
19
Hi
Unfortunately, we can't apply RETURN TO {method}. Only with programs and procedures

What I've done to completely isolate errors in one class was to execute class methods through a "proxy" procedure
Then, in Error method of the class fill class properties with error information and return to proxy procedure

You can see the approach in Firebird API wrapper class from download section.
Maybe you can do the same way in your case.


>I asked my question wrong.
>
>I have a process that goes thru various methods until I reach a point
>where I'm updating a record.
>
>I know the record should be there, but I test for it just in case.
>
>If the record is not there, what do you do at this point? You're already
>4 levels deep, and theres no reason to cancel, but you want to notify the
>user and recover gracefully.
>
>A TRY/CATCH in the 1st method won't solve this scenerio.
>
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform