We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class func goToSearchViewController(of mart: T, handler: @escaping((T,[U]?) -> Void)) { // make url session.dataTask(with: url) { (data, response, error) in if let response = response as? HTTPURLResponse, 200...299 ~= response.statusCode { do { // do something handler(T, [U]) } catch { handler(T,nil) } } else { handler(T,nil) } }.resume() } }
decode에 실패했을 때 실행되는 catch
네트워크 응답에 문제가 생겼을때 실행되는 else
catch
else
The text was updated successfully, but these errors were encountered:
jinios
No branches or pull requests
decode에 실패했을 때 실행되는 catch
문과네트워크 응답에 문제가 생겼을때 실행되는 else
이렇게 두 군데이다.catch
와else
문 두 가지도 구분이 필요하다.The text was updated successfully, but these errors were encountered: