NSSetUncaughtExceptionHandler捕获程序异常

 NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);

void uncaughtExceptionHandler(NSException *exception) {

    NSLog(@"CRASH: %@", exception);

    NSLog(@"Stack Trace: %@", [exception callStackSymbols]);

    // Internal error reporting

}


你可能感兴趣的:(NSSetUncaughtExceptionHandler捕获程序异常)