十一岁的加重songxing10000…… ------ 回到博主首页

int main(int argc, char * argv[]) 里的异常处理

#import <UIKit/UIKit.h>
#import "AppDelegate.h"

int main(int argc, char * argv[]) {
    @autoreleasepool {
        @try {
            return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
        }
        @catch (NSException *exception) {
            NSLog(@"蛋疼的异常:\n%@\n---------",[exception callStackSymbols]);
            NSLog(@"NSThread callStackSymbols:\n%@\n-------",[NSThread callStackSymbols]);
        }
        @finally {
            
        }
    }
}

 

posted @ 2016-04-02 23:17  songxing10000  阅读(333)  评论(0编辑  收藏  举报