NSSetUncaughtExceptionHandler(handle);
void handle(NSException *exception)
{
NSLog(@"崩溃的原因是%@",exception.reason);
NSLog(@"崩溃的名称是%@",exception.name);
NSLog(@"崩溃的堆栈信息是%@",exception.callStackSymbols);
[[NSRunLoop currentRunLoop]run];
[[NSRunLoop currentRunLoop]addPort:[NSPort port] forMode:NSRunLoopCommonModes];
}