From f99fb4c38de59dd119c241c68b3a43bf1e2f26eb Mon Sep 17 00:00:00 2001 From: milkpotatoes Date: Thu, 7 Aug 2025 02:04:14 +0000 Subject: [PATCH] Lower some error level log Issue: https://gitee.com/openharmony/arkui_napi/issues/ICRQ2L Signed-off-by: milkpotatoes --- native_engine/native_api.cpp | 4 ++-- native_engine/native_safe_async_work.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/native_engine/native_api.cpp b/native_engine/native_api.cpp index cf502895e..d98f61298 100644 --- a/native_engine/native_api.cpp +++ b/native_engine/native_api.cpp @@ -1290,7 +1290,7 @@ NAPI_EXTERN napi_status napi_call_function(napi_env env, function->CallForNapi(vm, thisObj, reinterpret_cast(argv), argc); // if pending exception, value will be a pointer to JSTaggedValue::Hole. if (UNLIKELY(!NapiStatusValidationCheck(value))) { - HILOG_ERROR("pending exception when js function called, print exception info: "); + HILOG_WARN("pending exception when js function called, print exception info: "); panda::JSNApi::PrintExceptionInfo(vm); result = nullptr; reinterpret_cast(env)->lastException_ = panda::JSNApi::GetUncaughtException(vm); @@ -1325,7 +1325,7 @@ NAPI_EXTERN napi_status napi_new_instance(napi_env env, panda::JSValueRef* instance = constructorVal->ConstructorOptimize(vm, reinterpret_cast(const_cast(argv)), argc); if (tryCatch.HasCaught()) { - HILOG_ERROR("CreateInstance occur Exception"); + HILOG_WARN("CreateInstance occur Exception"); *result = nullptr; } else { *result = reinterpret_cast(instance); diff --git a/native_engine/native_safe_async_work.cpp b/native_engine/native_safe_async_work.cpp index e487d42b1..31e1838f4 100644 --- a/native_engine/native_safe_async_work.cpp +++ b/native_engine/native_safe_async_work.cpp @@ -171,7 +171,7 @@ bool NativeSafeAsyncWork::IsMaxQueueSize() SafeAsyncCode NativeSafeAsyncWork::ValidEngineCheck() { if (!NativeEngine::IsAlive(engine_)) { - HILOG_ERROR("napi_env has been destoryed"); + HILOG_WARN("napi_env has been destoryed"); return SafeAsyncCode::SAFE_ASYNC_FAILED; } else if (engineId_ != engine_->GetId()) { LOG_IF_SPECIAL(engine_, UNLIKELY(engine_->IsCrossThreadCheckEnabled()), -- Gitee