PDA

View Full Version : NSScanner scanUpToString




vidyareef
Jan 12, 2009, 02:17 AM
Hi !

I am working with NSScanner .

NSScanner *scanner = [NSScanner scannerWithString: myData];
[scanner scanUpToString:@"valid" intoString:&temp];

Now in case there is no "valid" string in the search the software crashes saying "Terminated due to Uncaught Exception".

Please help, send me suggestion.
Is there something like try-catch in obective-C?



jnic
Jan 14, 2009, 11:12 AM
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_11_section_1.html

vidyareef
Jan 15, 2009, 03:48 AM
Thank you!

the link you send me seems helpful.

Vidya. :apple: