Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validate A Class
Message
De
05/04/2010 17:03:35
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01458686
Message ID:
01458829
Vues:
46
>>FWIW my vote would be against throwing exceptions for invalid or missing data.....
>
>Why not? Inquring minds wanna know....


Exceptions are expensive. By that I mean that it takes a lot of time to throw/catch them. They probably should not be used for something like validating data. If you can determine that there's a problem by checking stuff, then you should do it. Exceptions are more for errors that are not "checkable" easily any other way. That's a rather simplistic way of looking at it, but I think it's a good rule of thumb.

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform