feat:doric android and iOS's monitor add source parameter when exception
This commit is contained in:
@@ -40,10 +40,20 @@ - (instancetype)initWithContext:(DoricContext *)context callbackId:(NSString *)c
|
||||
}
|
||||
|
||||
- (void)resolve:(id)result {
|
||||
[self.context.driver invokeDoricMethod:DORIC_BRIDGE_RESOLVE, self.context.contextId, self.callbackId, result, nil];
|
||||
[[self.context.driver invokeDoricMethod:DORIC_BRIDGE_RESOLVE, self.context.contextId, self.callbackId, result, nil]
|
||||
setExceptionCallback:^(NSException *e) {
|
||||
[self.context.driver.registry
|
||||
onException:e
|
||||
source:self.context.source];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)reject:(id)result {
|
||||
[self.context.driver invokeDoricMethod:DORIC_BRIDGE_REJECT, self.context.contextId, self.callbackId, result, nil];
|
||||
[[self.context.driver invokeDoricMethod:DORIC_BRIDGE_REJECT, self.context.contextId, self.callbackId, result, nil]
|
||||
setExceptionCallback:^(NSException *e) {
|
||||
[self.context.driver.registry
|
||||
onException:e
|
||||
source:self.context.source];
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
@@ -108,7 +108,7 @@ - (id)findClass:(Class)clz target:(id)target method:(NSString *)name promise:(Do
|
||||
[invocation invoke];
|
||||
} @catch (NSException *exception) {
|
||||
DoricLog(@"CallNative Error:%@", exception.reason);
|
||||
[self.doricContext.driver.registry onException:exception];
|
||||
[self.doricContext.driver.registry onException:exception source:self.doricContext.source];
|
||||
}
|
||||
};
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
Reference in New Issue
Block a user