From 00a0343502ba57ea818c5b8941af580834037d21 Mon Sep 17 00:00:00 2001 From: liwang <965027894@qq.com> Date: Sat, 30 Aug 2025 15:04:40 +0800 Subject: [PATCH] =?UTF-8?q?sts=5Fconvert=5Fother.cpp=E6=96=87=E4=BB=B6?= =?UTF-8?q?=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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frameworks/ets/ani/src/sts_convert_other.cpp b/frameworks/ets/ani/src/sts_convert_other.cpp index 7631b34bd..ff137c287 100644 --- a/frameworks/ets/ani/src/sts_convert_other.cpp +++ b/frameworks/ets/ani/src/sts_convert_other.cpp @@ -28,7 +28,6 @@ std::shared_ptr UnwrapWantAgent(ani_env *env, ani_object agent) } WantAgent* pWantAgent = nullptr; AppExecFwk::UnwrapWantAgent(env, agent, reinterpret_cast(&pWantAgent)); - if (pWantAgent == nullptr) { ANS_LOGE("UnwrapWantAgent wantAgent nullptr"); return nullptr; @@ -50,6 +49,7 @@ ani_status UnwrapResource(ani_env *env, ani_object obj, ResourceManager::Resourc ani_boolean isUndefined = ANI_TRUE; if ((status = GetPropertyString(env, obj, "bundleName", isUndefined, tempStr)) != ANI_OK || isUndefined == ANI_TRUE) { + ANS_LOGE("GetPropertyString bundleName fail. status : %{public}d", status); return ANI_INVALID_ARGS; } std::string bundleName = GetResizeStr(tempStr, STR_MAX_SIZE); @@ -57,6 +57,7 @@ ani_status UnwrapResource(ani_env *env, ani_object obj, ResourceManager::Resourc if ((status = GetPropertyString(env, obj, "moduleName", isUndefined, tempStr)) != ANI_OK || isUndefined == ANI_TRUE) { + ANS_LOGE("GetPropertyString moduleName fail. status : %{public}d", status); return ANI_INVALID_ARGS; } std::string moduleName = GetResizeStr(tempStr, STR_MAX_SIZE); @@ -65,6 +66,7 @@ ani_status UnwrapResource(ani_env *env, ani_object obj, ResourceManager::Resourc ani_double idAni = 0.0; if ((status = GetPropertyDouble(env, obj, "id", isUndefined, idAni)) != ANI_OK || isUndefined == ANI_TRUE) { + ANS_LOGE("GetPropertyDouble id fail. status : %{public}d", status); return ANI_INVALID_ARGS; } resource.id = static_cast(idAni); -- Gitee