You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2018/12/24 08:55:20 UTC

[incubator-weex] branch master updated: * [Android] Add more log for list component's column count. (#1957)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new e977334  * [Android] Add more log for list component's column count. (#1957)
e977334 is described below

commit e97733416d97dc98054bad06c196c27e120c7f22
Author: YorkShen <sh...@gmail.com>
AuthorDate: Mon Dec 24 16:55:15 2018 +0800

    * [Android] Add more log for list component's column count. (#1957)
---
 .../main/java/com/taobao/weex/ui/component/list/WXListComponent.java | 5 +++--
 .../weex/ui/component/list/template/WXRecyclerTemplateList.java      | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java
index 96f3f14..95364e1 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java
@@ -24,7 +24,6 @@ import android.content.Context;
 import android.support.v4.util.ArrayMap;
 import android.support.v7.widget.PagerSnapHelper;
 import android.text.TextUtils;
-
 import com.alibaba.fastjson.JSON;
 import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.annotation.Component;
@@ -46,8 +45,8 @@ import com.taobao.weex.ui.view.refresh.wrapper.BounceRecyclerView;
 import com.taobao.weex.utils.WXExceptionUtils;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
-
 import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -176,6 +175,8 @@ public class WXListComponent extends BasicListComponent<BounceRecyclerView> {
     if (mColumnCount <= 0 && mLayoutType != TYPE_LINEAR_LAYOUT) {
       Map<String, String> ext = new ArrayMap<>();
       ext.put("componentType", getComponentType());
+      ext.put("attribute", getAttrs().toString());
+      ext.put("stackTrace", Arrays.toString(Thread.currentThread().getStackTrace()));
       WXExceptionUtils.commitCriticalExceptionRT(getInstanceId(),
           WXErrorCode.WX_RENDER_ERR_LIST_INVALID_COLUMN_COUNT, "columnCount",
           String.format(Locale.ENGLISH,
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
index 5831cb9..bc3e648 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
@@ -81,6 +81,7 @@ import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
 import com.taobao.weex.utils.WXViewUtils;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
@@ -934,6 +935,8 @@ public class WXRecyclerTemplateList extends WXVContainer<BounceRecyclerView> imp
         if (mColumnCount <= 0 && mLayoutType != TYPE_LINEAR_LAYOUT) {
             Map<String, String> ext = new ArrayMap<>();
             ext.put("componentType", getComponentType());
+            ext.put("attribute", getAttrs().toString());
+            ext.put("stackTrace", Arrays.toString(Thread.currentThread().getStackTrace()));
             WXExceptionUtils.commitCriticalExceptionRT(getInstanceId(),
                 WXErrorCode.WX_RENDER_ERR_LIST_INVALID_COLUMN_COUNT, "columnCount",
                 String.format(Locale.ENGLISH,