feat:doric android and iOS's monitor add source parameter when exception

This commit is contained in:
pengfei.zhou
2020-02-22 15:37:35 +08:00
committed by osborn
parent f65b116607
commit abb1873b49
15 changed files with 139 additions and 50 deletions

View File

@@ -139,7 +139,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];
[self.registry onException:exception source:@"InitEnvironment"];
}
}
@@ -206,7 +206,7 @@ - (void)callbackTimer:(NSTimer *)timer {
@try {
[self invokeDoricMethod:DORIC_TIMER_CALLBACK, timerId, nil];
} @catch (NSException *exception) {
[self.registry onException:exception];
[self.registry onException:exception source:@"Timer"];
[self.registry onLog:DoricLogTypeError
message:[NSString stringWithFormat:@"Timer Callback error:%@", exception.reason]];
}