On 16 feb 2012, at 07:18, Quincey Morris wrote:
>> Error Domain=NSCocoaErrorDomain Code=4 "The file “[…]” doesn’t exist."
>> UserInfo=0x400f252c0 {NSFilePath=/Volumes/[…], NSUnderlyingError=0x400f25140
>> "The operation couldn’t be completed. No such file or directory"}
>
> IOW, NSData is reporting the "wrong" error, as this message isn't helpful to
> present to the user.
> Is there another API I should be using that will producing an error saying
> that the file couldn't be created -- or better still saying *why* the file
> couldn't be created? Does the misleading error message count as a bug in
> -[NSData writeToURL:error:]?
Try looking at the underlying error (NSUnderlyingErrorKey in userInfo). That
might contain something more useful.
Tomas
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]