Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
- Subject: Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
- From: Gideon King <email@hidden>
- Date: Tue, 17 Jan 2012 12:44:55 +1000
Ah, I see. OK, I will create my own internal NSError object pointing to nil, and if I encounter an error in any of my called methods, I'll create an NSError for ti, and if I'm going to return NO, then I'll assign it to the pointer.
Thanks for the quick and helpful response Quincey.
Regards
Gideon
On 17/01/2012, at 12:37 PM, Quincey Morris wrote:
>
> You're not. 'outError' is an output-only parameter. The value of '*outError' on entry to the method is trash.
>
> The rule is that if your implementation of 'readFromURL:ofType:error:' is going to return NO, and the 'outError' pointer is not NULL, you *must* create a new NSError object and assign it '*outError'.
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden