NSError 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
recovery and the user has selected one of the error’s localized recovery options.
- iOS 2.0+
- macOS 10.4+
- tvOS 9.0+
- watchOS 2.0+
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,
attempt is invoked. If the error is presented in an application-modal dialog,
attempt is invoked.