Try
xConn.ConnectionString = xConnBuilder.ConnectionString
xConn.Open()
Throw New Exception("Something")
Catch ex As Exception
Throw
Finally
If xConn.State = ConnectionState.Open Then
xConn.Close()
End If
End Try
在抛出异常并重新抛出维护堆栈跟踪后连接对象会发生什么情况,它是否已关闭,因为在发生异常时未到达 finally 块。