修改codecheck

Signed-off-by: wangjianqiang <wangjianqiang19@huawei.com>
This commit is contained in:
wangjianqiang 2022-08-08 14:35:03 +08:00
parent 8b3211ffab
commit e2aef1e65c
2 changed files with 3 additions and 2 deletions

View File

@ -554,7 +554,7 @@ int JsFileAccessExtAbility::Rename(const Uri &sourceFile, const std::string &dis
std::vector<FileInfo> JsFileAccessExtAbility::ListFile(const Uri &sourceFile)
{
StartTrace(HITRACE_TAG_FILEMANAGEMENT, "ListFile");
StartTrace(HITRACE_TAG_FILEMANAGEMENT, "ListFile");
auto value = std::make_shared<Value<std::vector<FileInfo>>>();
auto argParser = [sourceFile](NativeEngine &engine, NativeValue *argv[], size_t &argc) -> bool {
NativeValue *uri = engine.CreateString(sourceFile.ToString().c_str(), sourceFile.ToString().length());

View File

@ -37,7 +37,8 @@ public:
// Note that ace engine cannot thow errors created by napi_create_error so far
napi_status throwStatus = napi_throw_error(env, std::to_string(errno_).c_str(), errMsg.c_str());
if (throwStatus != napi_ok) {
HILOG_WARN("Failed to throw an exception, %{public}d, code = %{public}s", throwStatus, std::to_string(errno_).c_str());
HILOG_WARN("Failed to throw an exception, %{public}d, code = %{public}s",
throwStatus, std::to_string(errno_).c_str());
}
}
private: