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(@"蛋疼的异常:
%@
---------",[exception callStackSymbols]);
            NSLog(@"NSThread callStackSymbols:
%@
-------",[NSThread callStackSymbols]);
        }
        @finally {
            
        }
    }
}
原文地址:https://www.cnblogs.com/songxing10000/p/5348578.html