Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
- Subject: Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
- From: Jens Alfke <email@hidden>
- Date: Fri, 26 Feb 2016 18:12:19 -0800
> On Feb 26, 2016, at 4:48 PM, Quincey Morris <email@hidden> wrote:
>
> According to NSError documentation:
<sarc>Thanks, but I did read the documentation before asking.</sarc>
> On Feb 26, 2016, at 4:53 PM, email@hidden wrote:
>
> It seems like the shorter one would be for a "click here to see more information or open this file URL”
Oh god, that possibility hadn’t even occurred to me — some kind of link to put into the alert?
These are errors related to a REST API, and I’m recording the URL that the error occurred at, which is absolutely not something the user needs to see.
> That said, the structure of the NSError userInfo dictionary is pretty loosely defined to use as you please it seems.
I work on a framework, not an app. So the NSErrors that I create and return need to be interpreted properly by the app developer; either so they can take action based on the error, or so that they can display the error in a meaningful way. In this case, if I use the wrong key it sounds like the resulting error alert might contain the long and cryptic URL of some REST API endpoint, which is useless to the user.
—Jens
_______________________________________________
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