Protocolswift 6.0.3Foundation
RecoverableError
Describes an error that may be recoverable by presenting several potential recovery options to the user.
protocol RecoverableError : Error
Browse conforming typesDescribes an error that may be recoverable by presenting several potential recovery options to the user.
protocol RecoverableError : Error
import Foundation
protocol Error : Sendable
A type representing an error value that can be thrown.
protocol Sendable
var recoveryOptions: [String] { get }
Provides a set of possible recovery options to present to the user.
func attemptRecovery(optionIndex recoveryOptionIndex: 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 recoveryOptionIndex: Int, resultHandler handler: @escaping (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).
func attemptRecovery(optionIndex recoveryOptionIndex: Int, resultHandler handler: @escaping (Bool) -> Void)
Default implementation that uses the application-model recovery mechanism (attemptRecovery(optionIndex:)
) to implement document-modal recovery.