I have a try/catch in a method and I am trying to catch first an NSRangeException and secondly the general NSException. The code looks basically like.

@try
{
        //A bunch of stuff here .....
}
@catch (NSRangeException *nSRE)
{
        NSLog(@"Width exception: %@ %@", [nSRE name], [nSRE reason]);
        result = nil;
}
@catch (NSException * e)
{
        NSLog(@"%@ %@", [e name], [e reason]);
        result = nil;
}

I get a compiler error ...
"error: syntax error before NSRangeException"
I can't figure out why. I am assuming I should be able to catch that exception type
Any help or suggestions would be appreciated
Thanks

Randy Canegaly

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to