Skip to content

Commit 9858f1b

Browse files
author
Itai Ferber
authored
Merge pull request #1539 from itaiferber/recoverableerror-escaping-resulthandler
RecoverableError's resultHandler needs @escaping
2 parents 6c59451 + 098997a commit 9858f1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/NSError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public protocol RecoverableError : Error {
267267
/// This entry point is used for recovery of errors handled at a
268268
/// "document" granularity, that do not affect the entire
269269
/// application.
270-
func attemptRecovery(optionIndex recoveryOptionIndex: Int, resultHandler handler: (_ recovered: Bool) -> Void)
270+
func attemptRecovery(optionIndex recoveryOptionIndex: Int, resultHandler handler: @escaping (_ recovered: Bool) -> Void)
271271

272272
/// Attempt to recover from this error when the user selected the
273273
/// option at the given index. Returns true to indicate
@@ -284,7 +284,7 @@ public extension RecoverableError {
284284
/// Default implementation that uses the application-model recovery
285285
/// mechanism (``attemptRecovery(optionIndex:)``) to implement
286286
/// document-modal recovery.
287-
func attemptRecovery(optionIndex recoveryOptionIndex: Int, resultHandler handler: (_ recovered: Bool) -> Void) {
287+
func attemptRecovery(optionIndex recoveryOptionIndex: Int, resultHandler handler: @escaping (_ recovered: Bool) -> Void) {
288288
handler(attemptRecovery(optionIndex: recoveryOptionIndex))
289289
}
290290
}

0 commit comments

Comments
 (0)