@@ -53,7 +53,7 @@ public protocol URLSessionDelegate : NSObjectProtocol {
53
53
* invalid because of a systemic error or when it has been
54
54
* explicitly invalidated, in which case the error parameter will be nil.
55
55
*/
56
- func urlSession( _ session: URLSession , didBecomeInvalidWithError error: NSError ? )
56
+ func urlSession( _ session: URLSession , didBecomeInvalidWithError error: Error ? )
57
57
58
58
/* If implemented, when a connection level authentication challenge
59
59
* has occurred, this delegate will be given the opportunity to
@@ -68,7 +68,7 @@ public protocol URLSessionDelegate : NSObjectProtocol {
68
68
}
69
69
70
70
extension URLSessionDelegate {
71
- public func urlSession( _ session: URLSession , didBecomeInvalidWithError error: NSError ? ) { }
71
+ public func urlSession( _ session: URLSession , didBecomeInvalidWithError error: Error ? ) { }
72
72
public func urlSession( _ session: URLSession , didReceive challenge: URLAuthenticationChallenge , completionHandler: @escaping ( URLSession . AuthChallengeDisposition , URLCredential ? ) -> Void ) { }
73
73
}
74
74
@@ -118,7 +118,7 @@ public protocol URLSessionTaskDelegate : URLSessionDelegate {
118
118
/* Sent as the last message related to a specific task. Error may be
119
119
* nil, which implies that no error occurred and this task is complete.
120
120
*/
121
- func urlSession( _ session: URLSession , task: URLSessionTask , didCompleteWithError error: NSError ? )
121
+ func urlSession( _ session: URLSession , task: URLSessionTask , didCompleteWithError error: Error ? )
122
122
}
123
123
124
124
extension URLSessionTaskDelegate {
@@ -136,7 +136,7 @@ extension URLSessionTaskDelegate {
136
136
137
137
public func urlSession( _ session: URLSession , task: URLSessionTask , didSendBodyData bytesSent: Int64 , totalBytesSent: Int64 , totalBytesExpectedToSend: Int64 ) { }
138
138
139
- public func urlSession( _ session: URLSession , task: URLSessionTask , didCompleteWithError error: NSError ? ) { }
139
+ public func urlSession( _ session: URLSession , task: URLSessionTask , didCompleteWithError error: Error ? ) { }
140
140
}
141
141
142
142
/*
0 commit comments