0

I'm tring to throw the exception here where the values is set in other class .but im getting the error as Terminating app due to uncaught exception of class 'nil' .can any one tell what is wrong with my code ?

    if ([someNameArray containsObject:name])
    {
        Classname *theclassname=[[Classname alloc]init];
        classinstatce.name1=@"hi";
        classinstatce.name2=@"message";
        @throw theclassname;

    }
lreddy
  • 449
  • 6
  • 19
  • What's your real code? Because classinstatce and classinstance are differents names. – Larme Nov 18 '13 at 14:48
  • What behavior were you expecting? Your code is trying to throw an exception and it looks like an exception was indeed thrown. Can you provide more background on what you’re trying to do? – bdesham Nov 18 '13 at 14:49

0 Answers0