Re: NSError help
Re: NSError help
- Subject: Re: NSError help
- From: Dave Carrigan <email@hidden>
- Date: Sun, 24 Oct 2010 20:30:46 -0700
The else will be fine, but the other half isn't because he isn't checking for nil err, as Greg and others pointed out.
On Oct 24, 2010, at 7:46 PM, Stephen J. Butler wrote:
> yes it will. i don't think the OP quite grasps pointer-to-pointers yet.
>
> On Sun, Oct 24, 2010 at 9:21 PM, Greg Guerin <email@hidden> wrote:
>> Dave Carrigan wrote:
>>
>>> This is fine, although the code in the else is useless.
>>
>>
>> It won't be fine if err is nil. That's another Cocoa idiom: if the
>> NSError** is nil, then no NSError* is returned.
>>
>> -- GG
>>
>>
>> _______________________________________________
>>
>> 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
>>
> _______________________________________________
>
> 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
_______________________________________________
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