Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for success of CreateObject?
Message
 
 
À
30/04/2009 14:08:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01397276
Message ID:
01397285
Vues:
104
No, you shouldn't wrap every CREATEOBJECT(). That's what your error handler is for.
You should do it only in cases when you expect that CREATEOBJECT() can fail for whatever reason in runtime and you want to handle it in some special way.

>Is this overkill, or do most programmers actually do this with every CreateObject request? Or should I just pay attention to what I am doing and rely on my manual testing to make sure I did it correctly?
>
>
>
>>Wrap CREATEOBJECT() with TRY...ENDTRY
>>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform