Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
- Subject: Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
- From: Quincey Morris <email@hidden>
- Date: Fri, 26 Feb 2016 16:48:17 -0800
- Feedback-id: 167118m:167118agrif8a:167118scc_9DEKFO:SMTPCORP
On Feb 26, 2016, at 16:33 , Jens Alfke <email@hidden> wrote:
>
> What’s the difference between these? If I’m creating an NSError and adding a URL to it, which one is preferred?
According to NSError documentation:
> • NSURLErrorKey
> The corresponding value is an NSURL object.
>
> • NSURLErrorFailingURLErrorKey
> The corresponding value is an NSURL containing the URL which caused a load to fail. This key is only present in the NSURLErrorDomain.
>
> • NSURLErrorFailingURLStringErrorKey
> The corresponding value is an NSString object for the URL which caused a load to fail. This key is only present in the NSURLErrorDomain.
>
> This constant supersedes NSErrorFailingURLStringKey, which was deprecated in OS X v10.6. Both constants refer to the same value for backward-compatibility, but this symbol name has a better prefix.
It sounds like NSURLErrorKey is what you want.
_______________________________________________
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