Skip to content

Commit ae8718f

Browse files
authored
Merge pull request #16182 from itaiferber/recoverableerror-escaping-resulthandler
RecoverableError's resultHandler needs @escaping
2 parents 8222664 + c87bf17 commit ae8718f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/SDK/Foundation/NSError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public protocol RecoverableError : Error {
109109
/// "document" granularity, that do not affect the entire
110110
/// application.
111111
func attemptRecovery(optionIndex recoveryOptionIndex: Int,
112-
resultHandler handler: (_ recovered: Bool) -> Void)
112+
resultHandler handler: @escaping (_ recovered: Bool) -> Void)
113113

114114
/// Attempt to recover from this error when the user selected the
115115
/// option at the given index. Returns true to indicate
@@ -127,7 +127,7 @@ public extension RecoverableError {
127127
/// mechanism (``attemptRecovery(optionIndex:)``) to implement
128128
/// document-modal recovery.
129129
func attemptRecovery(optionIndex recoveryOptionIndex: Int,
130-
resultHandler handler: (_ recovered: Bool) -> Void) {
130+
resultHandler handler: @escaping (_ recovered: Bool) -> Void) {
131131
handler(attemptRecovery(optionIndex: recoveryOptionIndex))
132132
}
133133
}

0 commit comments

Comments
 (0)