Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is ASSERT used for?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00141677
Message ID:
00142205
Vues:
37
>That wasn't my point. My point was that the error should be handled, not >ignored, even in the final app.

In your post, you stated the following:

"Turning ASSERTs off is like saying your app can't possibly contain the bugs the assertions are supposed to trap. I know I can't say this with absolute certainty about my code."

Assertions are not used to trap errors. Rather, assertions are a mechanism for making the developer aware that something - usually bad - has happened.

>
>>Craig is 100% correct here in that when distributing your application - Set Assert should be off.
>
>That, sir, is simply an assertion. :)

Thats pretty funny :)


>
>Actually, I agree. SET ASSERT should be off, only because if an error can happen during development, it can happen at the end-user's desk (though there are probably a few exceptions). Therefore, the error should be trapped like any other error, rather than risk corrupting data.
>
>By catching errors with assertions, and turning that checking off for the final product, you are saying your code contains no bugs that those assertions trapped, aren't you? Either that, or you'll take that chance over the speed hit.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform