Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CREATEOBJECT() failing with no error message?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00188404
Message ID:
00188538
Vues:
15
>If CREATEOBJECT() fails for any reason other than the Init returning false, I would certainly expect an error message. Something like "Insufficient Memory" - something related to the reason that it failed. To suggest otherwise implies that VFP shouldn't really report any errors at all.

Agree. Do you have an error handler active that might have caught the error?

>I agree that if the Init returns false, then it's up to the programmer to handle that. But if CREATEOBJECT() simply doesn't create the object, how am I to determine why? And why should I have to test the variable after every single CREATEOBJECT() statement? I don't think that's a viable solution at all.

It's called defensive programming.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform