¿Por qué el bloque @try no funciona? Se bloqueó la aplicación, pero se suponía que estaba atrapado por el bloque @try.@try - catch block en Objective-c
NSString* test = [NSString stringWithString:@"ss"];
@try {
[test characterAtIndex:6];
}
@catch (NSException * e) {
NSLog(@"Exception: %@", e);
}
@finally {
NSLog(@"finally");
}
Puede reemplazar NSString * test = [NSString stringWithString: @ "ss"]; con NSString * test = @ "ss"; –