I initialize AVCaptureDeviceInput. In Swift 2, instead of getting an NSError variable, you catch the error with a do-try-catch sandwich. However, I do not see how to get an NSError inside the catch part. The recommendation on the Apple Developer Forum does not indicate how you can access NSError.
Can someone enlighten me?
exception-handling swift2 error-handling avcapturedevice
CommaToast
source share