[
https://issues.apache.org/jira/browse/WEEX-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571090#comment-16571090
]
ASF GitHub Bot commented on WEEX-537:
-------------------------------------
YorkShen closed pull request #1370: * [WEEX-537][Android] Add more log when
callNative failed.
URL: https://github.com/apache/incubator-weex/pull/1370
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index c0bf2c5596..9c93167887 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -341,7 +341,19 @@ public Object callModuleMethod(String instanceId, String
moduleStr, String metho
return validateInfo;
}
}
- return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr,
args);
+ try {
+ return WXModuleManager.callModuleMethod(instanceId, moduleStr,
methodStr, args);
+ }catch(NumberFormatException e){
+ ArrayMap<String, String> ext = new ArrayMap<>();
+ ext.put("moduleName", moduleStr);
+ ext.put("methodName", methodStr);
+ ext.put("args", args.toJSONString());
+ WXLogUtils.e("[WXBridgeManager] callNative : numberFormatException when
parsing string to numbers in args", ext.toString());
+ WXExceptionUtils.commitCriticalExceptionRT(instanceId,
+ WXErrorCode.WX_KEY_EXCEPTION_INVOKE, "callNative",
+ "[WXBridgeManager] callNative : numberFormatException when parsing
string to numbers in args" , ext);
+ return null;
+ }
}
/**
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add JS Error Log in call native module
> --------------------------------------
>
> Key: WEEX-537
> URL: https://issues.apache.org/jira/browse/WEEX-537
> Project: Weex
> Issue Type: New Feature
> Reporter: YorkShen
> Assignee: YorkShen
> Priority: Major
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)