例外とは、コードが予期しない事態が起きた時に、処理を止めずに進めるための仕組みです。 予想外の入力を受け取った時なども、例外をキャッチすることで、後続の処理へと進めることができます。 たとえば・・・ NSMutableArray *array = [[NSMutableArray alloc] init]; [array insertObject:[[NSNumber alloc] initWithInt:100] atIndex:0]; [array insertObject:[[NSNumber alloc] initWithInt:200] atIndex:1]; [array insertObject:[[NSNumber alloc] initWithInt:300] atIndex:2]; NSLog(@"%d¥n",[[array objectAtIndex:3] intVa