我无法处理这些导致我的程序冻结的错误。
如何处理所有这些?这是我的调试器输出:
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
我用了
Try
Dim str As String = SerialPort.ReadLine()
Catch ex As Exception
MsgBox(ex)
End Try
但是程序仍然冻结!