I currently am having trouble troubleshooting this line of code. I want to catch the exception, but it keeps running. Therefore, it's obviously an exception that isn't within System. I tried these other system exceptions (and random ones just to see) but once I hit F10, it instead keeps going in the code and not the next line! Obviously something is wrong but I can't catch it.
Any ideas?
Here's the code:
Try
Dim txtRecord As New Bonjour.TXTRecord
m_async = m_socket.BeginReceive(m_buffer, 0, m_buffer.Length, SocketFlags.Partial, New AsyncCallback(AddressOf OnReceive), Me)
m_registrar = m_service.Register(0, 0, Environment.UserName, "_axis-video._tcp", "local", vbNullString, m_port, txtRecord, MyEventManager)
Catch ex As Exception
End Try
I'm using Bonjour in vb.net to try and use a mDNS service. Despite having breakpoints, the "catch" is never reached, and instead the window pops up with out any of these following services or code lines called.
EDIT: After taking after the very helpful comments (mentioned below!), I was able to catch it by calling the function by a non-load function. When that happened the expection was caught (socket exception).