feat:Android and iOS monitor use DoricContext as parameter

This commit is contained in:
pengfei.zhou
2020-03-07 10:38:42 +08:00
committed by osborn
parent 5a956950bd
commit 3b0a245129
19 changed files with 73 additions and 69 deletions

View File

@@ -62,7 +62,7 @@ - (instancetype)init {
- (void)initJSEngine {
self.jsExecutor = [DoricJSCoreExecutor new];
}
- (void)initJSExecutor {
__weak typeof(self) _self = self;
NSMutableDictionary *envDic = [self.innerEnvironmentDictionary mutableCopy];
@@ -140,7 +140,7 @@ - (void)initDoricEnvironment {
[self.jsExecutor loadJSScript:[self packageModuleScript:DORIC_MODULE_LIB content:jsContent]
source:[@"Module://" stringByAppendingString:DORIC_MODULE_LIB]];
} @catch (NSException *exception) {
[self.registry onException:exception source:@"InitEnvironment"];
[self.registry onException:exception inContext:nil];
}
}
@@ -207,7 +207,7 @@ - (void)callbackTimer:(NSTimer *)timer {
@try {
[self invokeDoricMethod:DORIC_TIMER_CALLBACK, timerId, nil];
} @catch (NSException *exception) {
[self.registry onException:exception source:@"Timer"];
[self.registry onException:exception inContext:nil];
[self.registry onLog:DoricLogTypeError
message:[NSString stringWithFormat:@"Timer Callback error:%@", exception.reason]];
}