I am unable to handle these errors which cause my program to freeze.
How to handle all these? This is my debugger output:
A first chance exception of type 'System.IO.IOException' occurred in System.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.dll
A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.TimeoutException' occurred in System.dll
A first chance exception of type 'System.IO.IOException' occurred in System.dll
I used
Try
Dim str As String = SerialPort.ReadLine()
Catch ex As Exception
MsgBox(ex)
End Try
But still the program freezes!