fail逻辑 test

phi_2.44.5.1
Sean 2024-05-20 16:03:55 +08:00
parent 59d54b8a55
commit 38fae22243
1 changed files with 15 additions and 9 deletions

View File

@ -29,17 +29,23 @@
return; return;
} }
// //
BOOL hasError = [[result allKeys] containsObject:@"errMsg"]; // BOOL hasError = [[result allKeys] containsObject:@"errMsg"];
// if (hasError) {
// NSString *errMsg = result[@"errMsg"];
// NSString *errPrefix = [NSString stringWithFormat:@"%@:fail", name];
// BOOL isFail = [errMsg hasPrefix:errPrefix];
// if (isFail) {
// NSLog(@"extensionApi reslut:fail");
// callback(FATExtensionCodeFailure,nil);
// return;
// }
// }
BOOL hasError = [[result allKeys] containsObject:@"phizErr"];
if (hasError) { if (hasError) {
NSString *errMsg = result[@"errMsg"]; callback(FATExtensionCodeFailure,result[@"phizErr"]);
NSString *errPrefix = [NSString stringWithFormat:@"%@:fail", name];
BOOL isFail = [errMsg hasPrefix:errPrefix];
if (isFail) {
NSLog(@"extensionApi reslut:fail");
callback(FATExtensionCodeFailure,nil);
return; return;
} }
}
// //
NSLog(@"extensionApi callback:%@",result); NSLog(@"extensionApi callback:%@",result);
callback(FATExtensionCodeSuccess,result); callback(FATExtensionCodeSuccess,result);