...
|
...
|
@@ -236,10 +236,9 @@ static dispatch_queue_t persisting_queue() { |
|
|
{
|
|
|
if (perf == nil || ![perf isKindOfClass:[YHPerformance class]]) {
|
|
|
#ifdef DEBUG
|
|
|
NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -261,10 +260,9 @@ static dispatch_queue_t persisting_queue() { |
|
|
{
|
|
|
if (itemData == nil || ![itemData isKindOfClass:[YHAnalyItemData class]]) {
|
|
|
#ifdef DEBUG
|
|
|
NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -322,20 +320,18 @@ static dispatch_queue_t persisting_queue() { |
|
|
} else {
|
|
|
#ifdef DEBUG
|
|
|
// 不处理非 Event 和 Error 类型的数据
|
|
|
NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is an unexpected value."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is an unexpected value."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
#ifdef DEBUG
|
|
|
// 不能存储
|
|
|
NSException *exception = [NSException exceptionWithName:NSMallocException
|
|
|
reason:@"Can't create folder for persisting."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSMallocException
|
|
|
reason:@"Can't create folder for persisting."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -344,10 +340,9 @@ static dispatch_queue_t persisting_queue() { |
|
|
{
|
|
|
if (itemData == nil || ![itemData isKindOfClass:[YHAnalyItemData class]]) {
|
|
|
#ifdef DEBUG
|
|
|
NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -435,10 +430,9 @@ static dispatch_queue_t persisting_queue() { |
|
|
} else {
|
|
|
#ifdef DEBUG
|
|
|
// 不处理非 Event 和 Error 类型的数据
|
|
|
NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is an unexpected value."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is an unexpected value."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -557,13 +551,6 @@ static dispatch_queue_t persisting_queue() { |
|
|
if ([allStatus count]) {
|
|
|
[allStatus replaceObjectAtIndex:0 withObject:self.currentStatus.jsonDictionary];
|
|
|
[self.immediUploadItemDic setObject:allStatus forKey:JsonKeyDataTypeStatus];
|
|
|
} else {
|
|
|
#ifdef DEBUG
|
|
|
NSException *exception = [NSException exceptionWithName:NSGenericException
|
|
|
reason:@"appId and sessionId do not be initialized. Please use prepareImmediUploadDic:sessionId:channelId: first."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
#endif
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -581,10 +568,9 @@ static dispatch_queue_t persisting_queue() { |
|
|
{
|
|
|
if (event == nil || ![event isKindOfClass:[YHEvent class]]) {
|
|
|
#ifdef DEBUG
|
|
|
NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
return NO;
|
|
|
}
|
...
|
...
|
@@ -655,10 +641,9 @@ static dispatch_queue_t persisting_queue() { |
|
|
performanceData.net = self.currentStatus.net;
|
|
|
if (performanceData == nil || ![performanceData isKindOfClass:[YHPerformance class]]) {
|
|
|
#ifdef DEBUG
|
|
|
NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
return NO;
|
|
|
}
|
...
|
...
|
@@ -730,10 +715,9 @@ static dispatch_queue_t persisting_queue() { |
|
|
{
|
|
|
if (errorData == nil || ![errorData isKindOfClass:[YHError class]]) {
|
|
|
#ifdef DEBUG
|
|
|
NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
[exception raise];
|
|
|
@throw [NSException exceptionWithName:NSInvalidArgumentException
|
|
|
reason:@"The input parameter is nil or an unexpected value."
|
|
|
userInfo:nil];
|
|
|
#endif
|
|
|
return NO;
|
|
|
}
|
...
|
...
|
|