• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSError help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: NSError help (From: Greg Guerin <email@hidden>)
 >Re: NSError help (From: "Stephen J. Butler" <email@hidden>)

  • Prev by Date: Re: NSError help
  • Next by Date: Debugging a self made Framework
  • Previous by thread: Re: NSError help
  • Next by thread: Debugging a self made Framework
  • Index(es):
    • Date
    • Thread