现在的位置: 首页 > 综合 > 正文

NSSetUncaughtExceptionHandler捕获程序异常

2018年09月10日 ⁄ 综合 ⁄ 共 222字 ⁄ 字号 评论关闭

 NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);

void uncaughtExceptionHandler(NSException *exception) {

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

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

    // Internal error reporting

}

抱歉!评论已关闭.