iOS:add monitor

This commit is contained in:
pengfei.zhou
2020-01-11 11:01:38 +08:00
committed by osborn
parent 0aaf105f53
commit caea154377
9 changed files with 96 additions and 19 deletions

View File

@@ -87,6 +87,7 @@ - (id)findClass:(Class)clz target:(id)target context:(DoricContext *)context met
[invocation invoke];
} @catch (NSException *exception) {
DoricLog(@"CallNative Error:%@", exception.reason);
[context.driver.registry onException:exception];
}
};
@@ -102,6 +103,8 @@ - (id)findClass:(Class)clz target:(id)target context:(DoricContext *)context met
ret = [JSValue valueWithObject:[returnValue copy] inContext:[JSContext currentContext]];
} else {
DoricLog(@"CallNative Error:%@", @"Must return object type");
[context.driver.registry onLog:DoricLogTypeError
message:[NSString stringWithFormat:@"CallNative Error:%@", @"Must return object type"]];
ret = nil;
}
}