Instance Method


Implemented to attempt a recovery from an error noted in a document-modal sheet.


- (void)attemptRecoveryFromError:(NSError *)error optionIndex:(NSUInteger)recoveryOptionIndex delegate:(id)delegate didRecoverSelector:(SEL)didRecoverSelector contextInfo:(void *)contextInfo;



An NSError object that describes the error, including error recovery options.


The index of the user selected recovery option in error’s localized recovery array.


An object that is the modal delegate.


A selector identifying the method implemented by the modal delegate.


Arbitrary data associated with the attempt at error recovery, to be passed to delegate in didRecoverSelector.


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 didRecoverSelector, passing the provided contextInfo.

The didRecoverSelector should have the following signature:

- (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo;

where didRecover is YES if the error recovery attempt was successful; otherwise it is NO.

See Also

Attempting Recovery From Errors

- attemptRecoveryFromError:optionIndex:

Implemented to attempt a recovery from an error noted in an application-modal dialog.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software