From 2c01045aaa1a4e9fd85e44c0dc8a45305ea2e975 Mon Sep 17 00:00:00 2001 From: liuhaotian Date: Sat, 4 Nov 2023 21:18:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8E=A5=E5=8F=A3=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuhaotian Change-Id: I9c3936f8c92264a1ec6cec69fae54ece51ed655a --- interfaces/kits/js/file_uri/get_uri_from_path.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interfaces/kits/js/file_uri/get_uri_from_path.cpp b/interfaces/kits/js/file_uri/get_uri_from_path.cpp index da98d8611..b5c75061f 100644 --- a/interfaces/kits/js/file_uri/get_uri_from_path.cpp +++ b/interfaces/kits/js/file_uri/get_uri_from_path.cpp @@ -29,20 +29,20 @@ napi_value GetUriFromPath::Sync(napi_env env, napi_callback_info info) NFuncArg funcArg(env, info); if (!funcArg.InitArgs(NARG_CNT::ONE)) { LOGE("GetUriFromPath::Sync Number of arguments unmatched"); - NError(EINVAL).ThrowErr(env); + NError(E_PARAMS).ThrowErr(env); return nullptr; } auto [succPath, path, ignore] = NVal(env, funcArg[NARG_POS::FIRST]).ToUTF8String(); if (!succPath) { LOGE("GetUriFromPath::Sync get path parameter failed!"); - NError(EINVAL).ThrowErr(env); + NError(E_PARAMS).ThrowErr(env); return nullptr; } std::string uri = CommonFunc::GetUriFromPath(path.get()); if (uri == "") { LOGE("GetUriFromPath failed!"); - NError(EINVAL).ThrowErr(env); + NError(E_PARAMS).ThrowErr(env); return nullptr; } -- Gitee