XCode
■ このスレッドは過去ログ倉庫に格納されています
0736733
04/04/28 21:25ID:cpEhcnkg#import <Cocoa/Cocoa.h>
@interface Test : NSObject
-(void)hoge;
@end
@implementation Test
-(void)hoge
{
[[NSArray array] objectAtIndex:5]; // 例外発生!!
}
@end
int main(int argc, const char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@try {
[[[[Test alloc] init] autorelease] hoge];
}
@catch (NSException *exception) {
NSLog(@"main: Caught %@: %@", [exception name], [exception reason]);
}
@finally {
NSLog( @"final" );
}
[pool release];
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています