Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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...

 

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

Posted

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 :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...