diff --git a/frameworks/ets/ani/src/sts_convert_other.cpp b/frameworks/ets/ani/src/sts_convert_other.cpp index 7631b34bd1371bb0dae04b868c99f59e715fded9..ff137c287cd118c316b71189fb11cad096a891c3 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);