(informal protocol)
| Framework | /System/Library/Frameworks/Foundation.framework |
| Declared in | NSError.h |
The NSErrorRecoveryAttempting informal protocol provides methods that allow your application to attempt to recover from an error. These methods are invoked when an NSError object is returned that specifies the implementing object as the error recoveryAttempter and the user has selected one of the error’s localized recovery options.
Which method is invoked is dependent on how the error is presented to the user. If the error is presented in a document-modal sheet, attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo: is invoked. If the error is presented in an application-modal dialog, attemptRecoveryFromError:optionIndex: is invoked.
– attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo: required method
– attemptRecoveryFromError:optionIndex: required method
Implemented to attempt a recovery from an error noted in an application-modal dialog. (required)
- (BOOL)attemptRecoveryFromError:(NSError *)error optionIndex:(NSUInteger)recoveryOptionIndex
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.
YES if the error recovery was completed successfully, NO otherwise.
Invoked when an error alert is been presented to the user in an application-modal dialog, and the user has selected an error recovery option specified by error.
NSError.hImplemented to attempt a recovery from an error noted in an document-modal sheet. (required)
- (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.
NSError.h
Last updated: 2007-02-23