From 0f629fa94c548f95db605884a804b9cac462523b Mon Sep 17 00:00:00 2001 From: liwang <965027894@qq.com> Date: Sat, 30 Aug 2025 15:47:30 +0800 Subject: [PATCH] =?UTF-8?q?sts=5Fconvert=5Fother.cpp=E6=96=87=E4=BB=B6GetR?= =?UTF-8?q?esourceArray=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_convert_other.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frameworks/ets/ani/src/sts_convert_other.cpp b/frameworks/ets/ani/src/sts_convert_other.cpp index 7631b34bd..e431d4527 100644 --- a/frameworks/ets/ani/src/sts_convert_other.cpp +++ b/frameworks/ets/ani/src/sts_convert_other.cpp @@ -156,7 +156,7 @@ ani_status GetResourceArray(ani_env *env, { ANS_LOGD("GetResourceArray call"); if (env == nullptr || param == nullptr || name == nullptr) { - ANS_LOGE("GetResourceArray failed, has nullPtr"); + ANS_LOGE("GetResourceArray fail. has nullPtr"); return ANI_ERROR; } ani_ref arrayObj = nullptr; @@ -164,12 +164,12 @@ ani_status GetResourceArray(ani_env *env, ani_status status; ani_int length; if ((status = GetPropertyRef(env, param, name, isUndefined, arrayObj)) != ANI_OK || isUndefined == ANI_TRUE) { - ANS_LOGE("GetResourceArray failed, status : %{public}d", status); + 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_LOGE("GetResourceArray : status : %{public}d", status); + ANS_LOGE("Object_GetPropertyByName_Int fail. status : %{public}d", status); return status; } for (int32_t i = 0; i < length; i++) { @@ -178,12 +178,12 @@ ani_status GetResourceArray(ani_env *env, "$_get", "i:C{std.core.Object}", &iconRef, i); if (status != ANI_OK) { res.clear(); - ANS_LOGE("GetResourceArray: status = %{public}d, index = %{public}d", status, i); + ANS_LOGE("Object_CallMethodByName_Ref fail. status = %{public}d, index = %{public}d", status, i); return status; } ResourceManager::Resource resource; if (ANI_OK != UnwrapResource(env, static_cast(iconRef), resource)) { - ANS_LOGE("GetResourceArray : status = %{public}d, index= %{public}d", status, i); + ANS_LOGE("UnwrapResource fail. status = %{public}d, index= %{public}d", status, i); res.clear(); return status; } -- Gitee