feat:Android and iOS monitor use DoricContext as parameter
This commit is contained in:
@@ -52,10 +52,6 @@ - (DoricRegistry *)registry {
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (NSString *)aliasWithContextId:(NSString *)contextId {
|
||||
return [[DoricContextManager instance] getContext:contextId].source;
|
||||
}
|
||||
|
||||
- (DoricAsyncResult<JSValue *> *)invokeDoricMethod:(NSString *)method arguments:(va_list)args {
|
||||
DoricAsyncResult *ret = [[DoricAsyncResult alloc] init];
|
||||
NSMutableArray *array = [[NSMutableArray alloc] init];
|
||||
@@ -104,7 +100,7 @@ - (DoricAsyncResult *)invokeContextEntity:(NSString *)contextId method:(NSString
|
||||
[ret setupResult:jsValue];
|
||||
} @catch (NSException *exception) {
|
||||
[ret setupError:exception];
|
||||
[self.jsExecutor.registry onException:exception source:[self aliasWithContextId:contextId]];
|
||||
[self.jsExecutor.registry onException:exception inContext:[[DoricContextManager instance] getContext:contextId]];
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
@@ -127,7 +123,7 @@ - (DoricAsyncResult *)invokeContextEntity:(NSString *)contextId method:(NSString
|
||||
[ret setupResult:jsValue];
|
||||
} @catch (NSException *exception) {
|
||||
[ret setupError:exception];
|
||||
[self.jsExecutor.registry onException:exception source:[self aliasWithContextId:contextId]];
|
||||
[self.jsExecutor.registry onException:exception inContext:[[DoricContextManager instance] getContext:contextId]];
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
@@ -144,7 +140,7 @@ - (DoricAsyncResult *)createContext:(NSString *)contextId script:(NSString *)scr
|
||||
[ret setupResult:@YES];
|
||||
} @catch (NSException *exception) {
|
||||
[ret setupError:exception];
|
||||
[self.jsExecutor.registry onException:exception source:source];
|
||||
[self.jsExecutor.registry onException:exception inContext:[[DoricContextManager instance] getContext:contextId]];
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
@@ -161,7 +157,7 @@ - (DoricAsyncResult *)destroyContext:(NSString *)contextId {
|
||||
[ret setupResult:@YES];
|
||||
} @catch (NSException *exception) {
|
||||
[ret setupError:exception];
|
||||
[self.jsExecutor.registry onException:exception source:[self aliasWithContextId:contextId]];
|
||||
[self.jsExecutor.registry onException:exception inContext:[[DoricContextManager instance] getContext:contextId]];
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user