ProtocolFoundation5.9.0
RecoverableError
Describes an error that may be recoverable by presenting several potential recovery options to the user.
protocol RecoverableError : Error
Supertypes
protocol Error
A type representing an error value that can be thrown.
protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
Requirements
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).