1
我一直在運行這段代碼很長一段時間,但突然它拋出錯誤下面,我怎麼突然得到這個沒有編輯代碼?以及我在do/catch語句中做錯了什麼?突然得到do/catch錯誤
func addInput(device: AVCaptureDevice) {
do {
captureSession.addInput(try AVCaptureDeviceInput(device: device))
} catch let err as NSError {
print(err)
}
}
錯誤
Errors thrown from here are not handled because the enclosing catch is not exhaustive
您沒有顯示錯誤。 – Mundi
對不起!!!添加 –