@@ -85,14 +85,14 @@ public protocol RecoverableError : ErrorProtocol {
85
85
var recoveryOptions : [ String ] { get }
86
86
87
87
/// Attempt to recover from this error when the user selected the
88
- /// option at the given index. This routine must call resultHandler and
88
+ /// option at the given index. This routine must call handler and
89
89
/// indicate whether recovery was successful (or not).
90
90
///
91
91
/// This entry point is used for recovery of errors handled at a
92
92
/// "document" granularity, that do not affect the entire
93
93
/// application.
94
94
func attemptRecovery( optionIndex recoveryOptionIndex: Int ,
95
- andThen resultHandler: ( recovered: Bool ) -> Void )
95
+ resultHandler handler : ( recovered: Bool ) -> Void )
96
96
97
97
/// Attempt to recover from this error when the user selected the
98
98
/// option at the given index. Returns true to indicate
@@ -106,11 +106,12 @@ public protocol RecoverableError : ErrorProtocol {
106
106
}
107
107
108
108
public extension RecoverableError {
109
- /// By default, implements document-modal recovery via application-model
110
- /// recovery.
109
+ /// Default implementation that uses the application-model recovery
110
+ /// mechanism (``attemptRecovery(optionIndex:)``) to implement
111
+ /// document-modal recovery.
111
112
func attemptRecovery( optionIndex recoveryOptionIndex: Int ,
112
- andThen resultHandler: ( recovered: Bool ) -> Void ) {
113
- resultHandler ( recovered: attemptRecovery ( optionIndex: recoveryOptionIndex) )
113
+ resultHandler handler : ( recovered: Bool ) -> Void ) {
114
+ handler ( recovered: attemptRecovery ( optionIndex: recoveryOptionIndex) )
114
115
}
115
116
}
116
117
0 commit comments