ときには起こせよエクセプション
- 5. Exception[33092:70b] *** Terminating app due
to uncaught exception
'NSInvalidArgumentException', reason: '***
setObjectForKey: object cannot be nil (key:
key)'
*** First throw call stack:
- 10. @try {
NSMutableArray* mutableArray;
mutableArray = [NSMutableArray new];
[mutableArray addObject:[NSObject new]];
id obj = [mutableArray objectAtIndex:1];
NSLog(@"◎");
}@catch (NSException *exception) {
NSLog(@"exception! %@", exception);
}
- 32. @try {
UIView *view = [UIView new];
[view addSubview:nil];
NSLog(@"◎");
}@catch (NSException *exception) {
NSLog(@"exception! %@", exception);
}