From 2fefe7333862d3aa3f2aed7998957653136c8857 Mon Sep 17 00:00:00 2001 From: liwang <965027894@qq.com> Date: Thu, 28 Aug 2025 20:41:51 +0800 Subject: [PATCH] =?UTF-8?q?sts=5Fcommon.cpp=E6=96=87=E4=BB=B6GetPropertyLo?= =?UTF-8?q?ngArray=E6=97=A5=E5=BF=97=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liwang <965027894@qq.com> --- frameworks/ets/ani/src/sts_common.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frameworks/ets/ani/src/sts_common.cpp b/frameworks/ets/ani/src/sts_common.cpp index 77f9cbce6..980ab92cc 100644 --- a/frameworks/ets/ani/src/sts_common.cpp +++ b/frameworks/ets/ani/src/sts_common.cpp @@ -404,12 +404,13 @@ ani_status GetPropertyLongArray(ani_env *env, ani_object param, const char *name ani_status status; ani_int length; if ((status = GetPropertyRef(env, param, name, isUndefined, arrayObj)) != ANI_OK || isUndefined == ANI_TRUE) { + ANS_LOGE("GetPropertyRef fail. status : %{public}d", status); return ANI_INVALID_ARGS; } status = env->Object_GetPropertyByName_Int(static_cast(arrayObj), "length", &length); if (status != ANI_OK) { - ANS_LOGI("status : %{public}d", status); + ANS_LOGE("Object_GetPropertyByName_Int status : %{public}d", status); return status; } @@ -418,14 +419,14 @@ ani_status GetPropertyLongArray(ani_env *env, ani_object param, const char *name status = env->Object_CallMethodByName_Ref(static_cast(arrayObj), "$_get", "i:C{std.core.Object}", &numEntryRef, i); if (status != ANI_OK) { - ANS_LOGI("status : %{public}d, index: %{public}d", status, i); + ANS_LOGE("Object_CallMethodByName_Ref status : %{public}d, index: %{public}d", status, i); return status; } ani_long longValue = 0.0; status = env->Object_CallMethodByName_Long(static_cast(numEntryRef), "unboxed", ":l", &longValue); if (status != ANI_OK) { - ANS_LOGI("Object_CallMethodByName_Long uid fail, status: %{public}d", status); + ANS_LOGE("Object_CallMethodByName_Long uid fail, status: %{public}d", status); return status; } res.push_back(static_cast(longValue)); -- Gitee