NSScanner scanUpToString

Discussion in 'iPhone/iPad Programming' started by vidyareef, Jan 12, 2009.

  1. macrumors newbie

    Joined:
    Jan 11, 2009
    #1
    Hi !

    I am working with NSScanner .

    NSScanner *scanner = [NSScanner scannerWithString: myData];
    [scanner scanUpToString:mad:"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?
     
  2. macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
  3. thread starter macrumors newbie

    Joined:
    Jan 11, 2009
    #3
    Handling Exceptions

    Thank you!

    the link you send me seems helpful.

    Vidya. :apple:
     

Share This Page