: "Tom Jones"
Cc: cocoa-dev@lists.apple.com
Sent: Sunday, October 24, 2010 4:05:19 PM
Subject: Re: NSError help
On Oct 24, 2010, at 5:54 PM, Tom Jones wrote:
> I'm trying to understand why I'm getting thrown in to the debugger when using
> NSError. I have three me
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
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 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
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 (Cocoa-dev@lis
On Oct 24, 2010, at 3:54 PM, Tom Jones wrote:
> Hello,
> I'm trying to understand why I'm getting thrown in to the debugger when using
> NSError. I have three methods and I'm overloading them and trying to pass the
> NSError along the way. What am I doing wrong?
>
> Thanks,
> tom
>
>
> Code:
On Sun, Oct 24, 2010 at 5:54 PM, Tom Jones wrote:
> -(NSString *)getDataForType:(NSString *)aType error:(NSError **)err
> {
> NSError *localErr = nil;
> NSString *result = [self getDataForType:aType separator:@"\t"
> excludeFields:nil error:&localErr];
> *err = *localErr;
> return res
On Oct 24, 2010, at 5:54 PM, Tom Jones wrote:
> I'm trying to understand why I'm getting thrown in to the debugger when using
> NSError. I have three methods and I'm overloading them and trying to pass the
> NSError along the way. What am I doing wrong?
> -(NSString *)getDataForType:(NSString *
Hello,
I'm trying to understand why I'm getting thrown in to the debugger when using
NSError. I have three methods and I'm overloading them and trying to pass the
NSError along the way. What am I doing wrong?
Thanks,
tom
Code:
-(NSString *)getDataForType:(NSString *)aType error:(NSError **)er