Problem with Try Catch block

LarryDietz

Member
Joined
Jan 14, 2004
Messages
6
Location
Winter Park, Florida
Ok, I dont know if I have changed a setting somewhere or not, but all of a sudden, my try catch blocks are failing to catch the error. Below is an example...

Code:
Try
      bytes = clistate.clisck.EndReceive(ar)
Catch e As System.Net.Sockets.SocketException
      Debug.Write(e.Message())
End Try

The line in the try block throws a System.Net.Sockets.SocketException error if the client program disconnect unexpectedly. At this point the server stops, saying that line threw an exception. If I hit F11 to step into the execution, the program continues with the catch block, and writes the e.message to the debug window.

This should not stop execution at this point, it should throw that message to the debug window and continue on its merry way.

This is only one example. ALL of the Try/Catch blocks in my program are failing simularly, which leads me to beleive I have changed a setting somewhere telling the software to halt on all errors, but I cant for the life of me figure out where this setting might be.

If anyone can give me a hand, it would be greatly appreciated.

Larry Dietz
larry@bastosdesign.com
 
Ok, I finally found the setting.

It was in the debug menu, under debug exceptions (You would think I would have found it sooner :))

System exceptions were set to break into the debugger, even if handled.

For the life of me, I do not remember ever going into that screen before. :(

But the main thing is, it is working correctly again :)
 
Back
Top