Thread: Survey Engine
View Single Post
  #4 (permalink)  
Old March 3rd, 2008, 04:13 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Correct, I didn't write those chapters.

AFAICS, the connection is not closed.

The Throw (ex) is not the most optimal solution. I think the idea was this:

Try
  ' Some risky code
Catch
  LogError()
  Throw
End Try

This way, the LogError() method is called to log the error somehow. The exception is the rethrown to cause it to bubble up to the ASP.NET error handling.

If you don't have error logging like this, you can remove the Try Catch statement altogether and just rely on ASP.NET error handling.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004