I have following code . . .
@try
{
NSArray * array = [[NSArray alloc] initWithObjects:@"1",@"2",nil];
// the below code will raise an exception
[array objectAtIndex:11];
}
@catch(NSException *exception)
{
// now i want to create a custom exception and throw it .
NSException * myexception = [[NSException alloc] initWithName:exception.name
reason:exception.reason
userInfo:exception.userInfo];
//now i am saving callStacksymbols to a mutable array and adding some objects
NSMUtableArray * mutableArray = [[NSMUtableArray alloc]
initWithArray:exception.callStackSymbols];
[mutableArray addObject:@"object"];
//but my problem is when i try to assign this mutable array to myexception i am getting following error
myexception.callStackSymbols = (NSArray *)mutableArray;
//error : no setter method 'setCallStackSymbols' for assignment to property
@throw myexception;
}
please help to fix this , i wanted to add some extra objects to callStackSymbols . . . .Thanks in advance