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;
}