Authored by 刘金林

remove useless code

... ... @@ -300,8 +300,8 @@
2EEBB0A220A978460069D069 /* YH_DeviceInfo */ = {
isa = PBXGroup;
children = (
2EEBB0A320A978C60069D069 /* YH_DeviceInfoMonitor.h */,
2EEBB0A420A978C60069D069 /* YH_DeviceInfoMonitor.m */,
2EEBB0A320A978C60069D069 /* YH_DeviceInfoMonitor.h */,
);
path = YH_DeviceInfo;
sourceTree = "<group>";
... ...
... ... @@ -48,11 +48,6 @@
- (void)reportWithPointType:(YHPointType)type pointName:(YHEventReportPointName)name parameters:(NSDictionary *)param;
/**
* 上报http请求,请在 setTaskDidCompleteBlock 中调用
*/
- (void)reportWithHttpRequestFinish:(NSURLRequest*)request response:(NSURLResponse*)response error:(NSError*)error;
/**
* @property
*
* @abstract
... ...
... ... @@ -231,25 +231,6 @@ static NSArray *kYHEventReportIgnoredViewControllerArray;
}
}
- (void)reportWithHttpRequestFinish:(NSURLRequest*)request response:(NSURLResponse*)response error:(NSError*)error
{
@try {
NSString *hostInHTTPField = [request.allHTTPHeaderFields objectForKey:@"Host"];
if ([YHEventReport sharedInstance].isPerformanceTrackEnabled && [YHEventReport sharedInstance].isHttpPerformanceTrackEnable && !error && ([[request.URL host] isEqualToString:YHEventReportHttpHost] || [hostInHTTPField isEqualToString:YHEventReportHttpHost])) {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)response;
NSDictionary *httpResponseHeaderFields = [httpResponse allHeaderFields];
NSString *contentLength = [NSString stringWithFormat:@"%lld",[[httpResponseHeaderFields objectForKey:@"Content-Length"] longLongValue]];
NSString *statusCode = [NSString stringWithFormat:@"%ld",(long)httpResponse.statusCode];
NSString *HTTPBodyStr = [[NSString alloc]initWithData:request.HTTPBody encoding:NSUTF8StringEncoding];
[[YH_EventCollector sharedInstance] timeEventEndWithRequestUrl:[request.URL absoluteString] HTTPMethod:request.HTTPMethod statusCode:statusCode contentLength:contentLength HTTPBodyStr:HTTPBodyStr];
}
} @catch (NSException *exception) {
YHLog(@"%@ error: %@", self, exception);
}
}
#pragma mark - Exception handle methods
// 发送本地存储的Exception数据
- (void)uploadLocalErrorData
... ...
... ... @@ -12,12 +12,4 @@
+ (YH_CrashReporter *)sharedInstance;
- (NSString *)callstackString;
- (void)handleSignal:(NSDictionary *)userInfo;
- (void)handleNSException:(NSDictionary *)userInfo;
-(NSString *)getStringFromArray:(NSArray *)array;
@end
... ...
... ... @@ -17,6 +17,15 @@
#pragma mark - C Fuctions
@interface YH_CrashReporter()
- (NSString *)callstackString;
- (void)handleSignal:(NSDictionary *)userInfo;
- (void)handleNSException:(NSDictionary *)userInfo;
-(NSString *)getStringFromArray:(NSArray *)array;
@end
void yh_sighandler(int signal)
{
const char* names[NSIG];
... ...