ProtocolFoundation
RecoverableError
Describes an error that may be recoverable by presenting several potential recovery options to the user.
protocol RecoverableError : Error
Describes an error that may be recoverable by presenting several potential recovery options to the user.
protocol RecoverableError : Error
var recoveryOptions: [String]
Provides a set of possible recovery options to present to the user.
func attemptRecovery(optionIndex: Int) -> Bool
Attempt to recover from this error when the user selected the option at the given index. Returns true to indicate successful recovery, and false otherwise.
func attemptRecovery(optionIndex: Int, resultHandler: (Bool) -> Void)
Attempt to recover from this error when the user selected the option at the given index. This routine must call handler and indicate whether recovery was successful (or not).