|
@@ -91,26 +91,30 @@ void UncaughtExceptionHandler(NSException *exception) {
|
|
|
|
|
|
|
|
if ([manager fileExistsAtPath:err_log_path]) {
|
|
if ([manager fileExistsAtPath:err_log_path]) {
|
|
|
|
|
|
|
|
- NSMutableDictionary *err_dic = [NSMutableDictionary dictionaryWithContentsOfFile:err_log_path];
|
|
|
|
|
-
|
|
|
|
|
- NSArray *flags = [err_dic allKeys];
|
|
|
|
|
- [flags enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
|
-
|
|
|
|
|
- NSDictionary *err_log = [err_dic objectForKey:obj];
|
|
|
|
|
-
|
|
|
|
|
- NSString *device_info = [err_log objectForKey:@"device"];
|
|
|
|
|
- NSString *exception_info = [err_log objectForKey:@"exception"];
|
|
|
|
|
- NSString *time = [err_log objectForKey:@"time"];
|
|
|
|
|
-
|
|
|
|
|
- NSDictionary *resultDic = [RANetwork collectErrMsg:exception_info DeviceInfo:device_info Time:time];
|
|
|
|
|
- int result = [[resultDic objectForKey:@"result"] intValue];
|
|
|
|
|
- if (result == RESULT_TRUE) {
|
|
|
|
|
- [err_dic removeObjectForKey:obj];
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }];
|
|
|
|
|
-
|
|
|
|
|
- [err_dic writeToFile:err_log_path atomically:NO];
|
|
|
|
|
|
|
+ dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
|
|
|
|
+
|
|
|
|
|
+ NSMutableDictionary *err_dic = [NSMutableDictionary dictionaryWithContentsOfFile:err_log_path];
|
|
|
|
|
+
|
|
|
|
|
+ NSArray *flags = [err_dic allKeys];
|
|
|
|
|
+ [flags enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
|
+
|
|
|
|
|
+ NSDictionary *err_log = [err_dic objectForKey:obj];
|
|
|
|
|
+
|
|
|
|
|
+ NSString *device_info = [err_log objectForKey:@"device"];
|
|
|
|
|
+ NSString *exception_info = [err_log objectForKey:@"exception"];
|
|
|
|
|
+ NSString *time = [err_log objectForKey:@"time"];
|
|
|
|
|
+
|
|
|
|
|
+ NSDictionary *resultDic = [RANetwork collectErrMsg:exception_info DeviceInfo:device_info Time:time];
|
|
|
|
|
+ int result = [[resultDic objectForKey:@"result"] intValue];
|
|
|
|
|
+ if (result == RESULT_TRUE) {
|
|
|
|
|
+ [err_dic removeObjectForKey:obj];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }];
|
|
|
|
|
+
|
|
|
|
|
+ [err_dic writeToFile:err_log_path atomically:NO];
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|