Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for success of CreateObject?
Message
 
 
To
30/04/2009 14:08:48
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01397276
Message ID:
01397285
Views:
103
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform