func attemptRecovery (fromError : Error, optionIndex : Int) -> Bool
An NSError
object that describes the error, including error recovery options.
Availability
Technology
func attemptRecovery(fromError error: Error
,
optionIndex recoveryOptionIndex: Int
,
delegate: Any?,
didRecoverSelector: Selector
?,
contextInfo: UnsafeMutableRawPointer
?)
error
An NSError
object that describes the error, including error recovery options.
recoveryOptionIndex
The index of the user selected recovery option in error
’s localized recovery array.
delegate
An object that is the modal delegate.
didRecoverSelector
A selector identifying the method implemented by the modal delegate.
contextInfo
Arbitrary data associated with the attempt at error recovery, to be passed to delegate
in did
.
Invoked when an error alert is presented to the user in a document-modal sheet, and the user has selected an error recovery option specified by error
. After recovery is attempted, your implementation should send delegate
the message specified in did
, passing the provided context
.
The did
should have the following signature:
where did
is true
if the error recovery attempt was successful; otherwise it is false
.
func attemptRecovery (fromError : Error, optionIndex : Int) -> Bool