...
|
...
|
@@ -13,6 +13,7 @@ |
|
|
#import "YHEventReportMacros.h"
|
|
|
#import "YHLog.h"
|
|
|
#import "YHEventReport.h"
|
|
|
#import "YH_EventCollector.h"
|
|
|
|
|
|
#pragma mark - C Fuctions
|
|
|
|
...
|
...
|
@@ -29,10 +30,12 @@ void yh_sighandler(int signal) |
|
|
YH_CrashReporter *crash = [[YH_CrashReporter alloc] init];
|
|
|
|
|
|
NSString *str = [crash callstackString];
|
|
|
NSString *pageChains = [[YH_EventCollector sharedInstance] pageChainStr] ?:@"";
|
|
|
NSDictionary *userInfo = @{
|
|
|
YOHOAppReportCrashCallstack : str,
|
|
|
YOHOAppReportCrashSignal : @(signal),
|
|
|
YOHOAppReportCrashSignalName : [NSString stringWithUTF8String:names[signal]],
|
|
|
YOHOAppReportCrashPageChain : pageChains,
|
|
|
};
|
|
|
[crash performSelectorOnMainThread:@selector(handleSignal:) withObject:userInfo waitUntilDone:YES];
|
|
|
}
|
...
|
...
|
@@ -43,10 +46,12 @@ void yh_uncaughtCrashExceptionHandler(NSException *exception) |
|
|
|
|
|
NSArray *arr = [exception callStackSymbols];
|
|
|
NSString *str = [crash getStringFromArray:arr];
|
|
|
NSString *pageChains = [[YH_EventCollector sharedInstance] pageChainStr] ?:@"";
|
|
|
NSDictionary *userInfo = @{
|
|
|
YOHOAppReportCrashCallstack : str,
|
|
|
YOHOAppReportCrashExceptionName : exception.name,
|
|
|
YOHOAppReportCrashExceptionReason : exception.reason,
|
|
|
YOHOAppReportCrashPageChain : pageChains,
|
|
|
};
|
|
|
[crash performSelectorOnMainThread:@selector(handleNSException:) withObject:userInfo waitUntilDone:YES];
|
|
|
}
|
...
|
...
|
|