Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
- Subject: Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
- From: email@hidden
- Date: Sat, 27 Feb 2016 09:53:59 +0900
It seems like the shorter one would be for a "click here to see more information or open this file URL" and the longer one is for "this URL failed to load".
But it definitely deserves a docs bug.
It might be one of those obscure things noted in some programming guide doc, but even if it is that's too hard to find when the header and the class reference could be more explicit.
That said, the structure of the NSError userInfo dictionary is pretty loosely defined to use as you please it seems.
Sent from my iPhone
> On Feb 27, 2016, at 9:33 AM, Jens Alfke <email@hidden> wrote:
>
> So, NSError.h declares NSURLErrorKey, as a userInfo key for the URL associated with the error.
> And NSURLError.h declares NSURLErrorFailingURLErrorKey, which appears to have the same purpose.
> Neither of these is deprecated, although there’s yet another constant (NSErrorFailingURLStringKey) that is.
>
> What’s the difference between these? If I’m creating an NSError and adding a URL to it, which one is preferred?
_______________________________________________
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