Compiler error when trying to catch a NSRangeException
Compiler error when trying to catch a NSRangeException
- Subject: Compiler error when trying to catch a NSRangeException
- From: Randy <email@hidden>
- Date: Sun, 27 Jul 2008 14:56:47 -0600
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 (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