From 15822afffda7e729bbb68b3f3a899ea90a66df6e Mon Sep 17 00:00:00 2001 From: heguokai <275503077@qq.com> Date: Sat, 30 Aug 2025 09:29:52 +0800 Subject: [PATCH] =?UTF-8?q?AniAddSlotByNotificationSlot=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: heguokai <275503077@qq.com> --- frameworks/ets/ani/src/manager/ani_slot.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frameworks/ets/ani/src/manager/ani_slot.cpp b/frameworks/ets/ani/src/manager/ani_slot.cpp index 2c899e899..106112ab1 100644 --- a/frameworks/ets/ani/src/manager/ani_slot.cpp +++ b/frameworks/ets/ani/src/manager/ani_slot.cpp @@ -69,7 +69,7 @@ void AniAddSlots(ani_env *env, ani_object notificationSlotArrayObj) int returncode = Notification::NotificationHelper::AddNotificationSlots(slots); if (returncode != ERR_OK) { int externalCode = NotificationSts::GetExternalCode(returncode); - ANS_LOGE("AniAddSlots -> error, errorCode: %{public}d", externalCode); + ANS_LOGE("AddNotificationSlots failed, errorCode: %{public}d", externalCode); NotificationSts::ThrowError(env, externalCode, NotificationSts::FindAnsErrMsg(externalCode)); return; } @@ -84,12 +84,13 @@ void AniAddSlotByNotificationSlot(ani_env *env, ani_object notificationSlotObj) if (NotificationSts::UnwrapNotificationSlot(env, notificationSlotObj, slot)) { returncode = Notification::NotificationHelper::AddNotificationSlot(slot); } else { + ANS_LOGE("UnwrapNotificationSlot failed"); NotificationSts::ThrowStsErroWithMsg(env, "sts AddSlot ERROR_INTERNAL_ERROR"); return; } if (returncode != ERR_OK) { int externalCode = NotificationSts::GetExternalCode(returncode); - ANS_LOGE("sts AddSlot error, errorCode: %{public}d", externalCode); + ANS_LOGE("AddNotificationSlot failed, errorCode: %{public}d", externalCode); OHOS::NotificationSts::ThrowError(env, externalCode, NotificationSts::FindAnsErrMsg(externalCode)); return; } -- Gitee