View Single Post
  #7 (permalink)  
Old 06-25-2008, 02:33 PM
Xav's Avatar   
Xav Xav is offline
Code Slinger
 
Join Date: Mar 2008
Location: The North Pole
Posts: 11,010
Last Blog:
Web slideshow in JavaS...
Credits: 1
Rep Power: 86
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Exception Handling in .NET

I agree that exceptions should not be relied on instead of data validation, as a sort of escape route. The problem with exceptions is that you can't tell exactly why the error was caused - for example, by explicitly checking the bounds of a variable, you can tell the user exactly what went wrong. With an exception, however, you can only show the error message, as the specific exception could have been thrown by any of the statements.

That said, exceptions are a super way to keep out of trouble, and should be used on all potentially problematic statements. I.E. everywhere.
__________________


Mr. Xav | Website | Forums | Blog
Reply With Quote