View Single Post
  #1 (permalink)  
Old May 30th, 2013, 01:03 PM
Tulsi Tulsi is offline
Friend of Wrox
Points: 595, Level: 8
Points: 595, Level: 8 Points: 595, Level: 8 Points: 595, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
Default Exception Handling Tip - Ch. 18, p.695

Hi Imar,

I'm reviewing the tips at the end of Ch. 18 and am trying to get a better understanding of the last tip,

Quote:
"Be as explicit as possible with the Exception types you catch in Try/Catch blocks. Try to avoid catching generic Exception types and set up multiple, explicit Catch blocks for each specific type you anticipate."
Using the exercise on "Handling Exceptions" and the ContactForm.ascx (p. 663) as an example, how would you know what specific exceptions to catch for sending emails and how would you change this example?

Thanks,
Tulsi