Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validate A Class
Message
From
05/04/2010 17:03:35
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01458686
Message ID:
01458829
Views:
44
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform