Home
last modified time | relevance | path

Searched refs:errCode (Results 1 – 25 of 334) sorted by relevance

12345678910>>...14

/base/telephony/call_manager/services/telephony_interaction/src/
Dcellular_call_connection.cpp186 int errCode = cellularCallInterfacePtr_->Dial(callInfo); in Dial() local
187 if (errCode != TELEPHONY_SUCCESS) { in Dial()
188 TELEPHONY_LOGE("dial failed, errcode:%{public}d", errCode); in Dial()
189 return errCode; in Dial()
202 int errCode = cellularCallInterfacePtr_->HangUp(callInfo, type); in HangUp() local
203 if (errCode != TELEPHONY_SUCCESS) { in HangUp()
204 TELEPHONY_LOGE("hangup call failed, errcode:%{public}d", errCode); in HangUp()
205 return errCode; in HangUp()
218 int errCode = cellularCallInterfacePtr_->Reject(callInfo); in Reject() local
219 if (errCode != TELEPHONY_SUCCESS) { in Reject()
[all …]
/base/account/os_account/frameworks/common/account_error/src/
Daccount_error_no.cpp28 int32_t AppAccountConvertOtherJSErrCode(int32_t errCode) in AppAccountConvertOtherJSErrCode() argument
30 switch (errCode) { in AppAccountConvertOtherJSErrCode()
67 int32_t AppAccountConvertToJSErrCode(int32_t errCode) in AppAccountConvertToJSErrCode() argument
69 if (errCode == ERR_ACCOUNT_COMMON_PERMISSION_DENIED) { in AppAccountConvertToJSErrCode()
71 } else if (errCode == ERR_APPACCOUNT_SERVICE_GET_BUNDLE_NAME || in AppAccountConvertToJSErrCode()
72 errCode == ERR_APPACCOUNT_SERVICE_GET_BUNDLE_INFO || in AppAccountConvertToJSErrCode()
73 errCode == ERR_APPACCOUNT_SERVICE_DISABLE_APP_ACCESS_NOT_EXISTED) { in AppAccountConvertToJSErrCode()
75 } else if (errCode == ERR_APPACCOUNT_SERVICE_OAUTH_SERVICE_EXCEPTION) { in AppAccountConvertToJSErrCode()
78 return AppAccountConvertOtherJSErrCode(errCode); in AppAccountConvertToJSErrCode()
82 int32_t OsAccountConvertToJSErrCode(int32_t errCode) in OsAccountConvertToJSErrCode() argument
[all …]
/base/telephony/call_manager/frameworks/native/src/
Dcall_manager_proxy.cpp346 int32_t errCode = callManagerServicePtr_->DialCall(number, extras); in DialCall() local
347 if (errCode != TELEPHONY_SUCCESS) { in DialCall()
348 TELEPHONY_LOGE("DialCall failed, errcode:%{public}d", errCode); in DialCall()
349 return errCode; in DialCall()
361 int32_t errCode = callManagerServicePtr_->AnswerCall(callId, videoState); in AnswerCall() local
362 if (errCode != TELEPHONY_SUCCESS) { in AnswerCall()
363 TELEPHONY_LOGE("AnswerCall failed, errcode:%{public}d", errCode); in AnswerCall()
364 return errCode; in AnswerCall()
376 int32_t errCode = callManagerServicePtr_->RejectCall(callId, isSendSms, content); in RejectCall() local
377 if (errCode != TELEPHONY_SUCCESS) { in RejectCall()
[all …]
/base/account/os_account/frameworks/test/unittest/
Daccount_osaccount_proxy_mock_test.cpp94 …ErrCode errCode = OsAccountManager::CreateOsAccount(STRING_TEST_NAME, OsAccountType::ADMIN, osAcco… variable
95 ASSERT_EQ(ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY_MANAGER, errCode);
110 ErrCode errCode = OsAccountManager::CreateOsAccountForDomain(type, domainInfo, osAccountInfo); variable
111 ASSERT_EQ(ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY_MANAGER, errCode);
123 ErrCode errCode = OsAccountManager::OsAccountManager::RemoveOsAccount(TEST_USER_ID); variable
124 ASSERT_EQ(ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY_MANAGER, errCode);
136 ErrCode errCode = OsAccountManager::IsOsAccountExists(TEST_USER_ID, isOsAccountExists); variable
137 ASSERT_EQ(ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY_MANAGER, errCode);
150 ErrCode errCode = OsAccountManager::IsOsAccountActived(TEST_USER_ID, isOsAccountActived); variable
151 ASSERT_EQ(ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY_MANAGER, errCode);
[all …]
/base/account/os_account/services/accountmgr/src/osaccount/
Dinner_os_account_manager.cpp110 ErrCode errCode = osAccountControl_->GetConstraintsByType(OsAccountType::ADMIN, constants); in CreateBaseStandardAccount() local
111 if (errCode != ERR_OK) { in CreateBaseStandardAccount()
112 ACCOUNT_LOGE("find first standard type err, errCode %{public}d.", errCode); in CreateBaseStandardAccount()
159 ErrCode errCode = osAccountControl_->GetOsAccountInfoById(defaultActivatedId_, osAccountInfo); in RetryToGetAccount() local
160 if (errCode != ERR_OK) { in RetryToGetAccount()
161 …NT_LOGE("account not found, localId: %{public}d, error: %{public}d", defaultActivatedId_, errCode); in RetryToGetAccount()
222 ErrCode errCode = FillOsAccountInfo(localName, shortName, type, domainInfo, osAccountInfo); in RetryToGetAccount() local
223 if (errCode != ERR_OK) { in RetryToGetAccount()
224 return errCode; in RetryToGetAccount()
227 errCode = ValidateOsAccount(osAccountInfo); in RetryToGetAccount()
[all …]
Dos_account_domain_account_callback.cpp36 void CheckAndCreateDomainAccountCallback::OnResult(int32_t errCode, Parcel &parcel) in OnResult() argument
45 if (errCode != ERR_OK) { in OnResult()
47 return innerCallback_->OnResult(errCode, resultParcel); in OnResult()
62errCode = IInnerOsAccountManager::GetInstance().BindDomainAccount(type_, domainAccountInfo, innerC… in OnResult()
63 if (errCode != ERR_OK) { in OnResult()
64 return innerCallback_->OnResult(errCode, resultParcel); in OnResult()
75 void BindDomainAccountCallback::OnResult(int32_t errCode, Parcel &parcel) in OnResult() argument
81 if (errCode != ERR_OK) { in OnResult()
86 return innerCallback_->OnResult(errCode, parcel); in OnResult()
90 errCode = IInnerOsAccountManager::GetInstance().SendMsgForAccountCreate(osAccountInfo_); in OnResult()
[all …]
Dos_account_database_operator.cpp69 ErrCode errCode = ERR_OK; in GetOsAccountListFromDatabase() local
71 errCode = accountDataStorage_->LoadAllData(osAccountMapInfos); in GetOsAccountListFromDatabase()
79 errCode = storagePtr->LoadAllData(osAccountMapInfos); in GetOsAccountListFromDatabase()
82 if (errCode != ERR_OK) { in GetOsAccountListFromDatabase()
84 return errCode; in GetOsAccountListFromDatabase()
108 ErrCode errCode = accountDataStorage_->AddAccountInfo(osAccountInfo); in InsertOsAccountIntoDataBase() local
109 if (errCode != ERR_OK) { in InsertOsAccountIntoDataBase()
111 errCode, osAccountInfo.GetLocalId()); in InsertOsAccountIntoDataBase()
124 ErrCode errCode = accountDataStorage_->RemoveValueFromKvStore(std::to_string(id)); in DelOsAccountFromDatabase() local
125 if (errCode != ERR_OK) { in DelOsAccountFromDatabase()
[all …]
/base/notification/distributed_notification_service/services/ans/src/
Dadvanced_notification_subscriber_service.cpp48 ErrCode errCode = ERR_OK; in Subscribe() local
51 errCode = ERR_ANS_INVALID_PARAM; in Subscribe()
58 errCode = ERR_ANS_NON_SYSTEM_APP; in Subscribe()
63 errCode = ERR_ANS_PERMISSION_DENIED; in Subscribe()
67 errCode = NotificationSubscriberManager::GetInstance()->AddSubscriber(subscriber, info); in Subscribe()
68 if (errCode != ERR_OK) { in Subscribe()
73 …SendSubscribeHiSysEvent(IPCSkeleton::GetCallingPid(), IPCSkeleton::GetCallingUid(), info, errCode); in Subscribe()
74 return errCode; in Subscribe()
82 ErrCode errCode = ERR_OK; in SubscribeSelf() local
85 errCode = ERR_ANS_INVALID_PARAM; in SubscribeSelf()
[all …]
Dadvanced_notification_event_service.cpp40 const sptr<NotificationSubscribeInfo> &info, ErrCode errCode) in SendSubscribeHiSysEvent() argument
55 if (errCode != ERR_OK) { in SendSubscribeHiSysEvent()
56 eventInfo.errCode = errCode; in SendSubscribeHiSysEvent()
81 …tificationService::SendPublishHiSysEvent(const sptr<NotificationRequest> &request, ErrCode errCode) in SendPublishHiSysEvent() argument
92 if (errCode != ERR_OK) { in SendPublishHiSysEvent()
93 eventInfo.errCode = errCode; in SendPublishHiSysEvent()
101 const sptr<NotificationBundleOption> &bundleOption, ErrCode errCode) in SendCancelHiSysEvent() argument
103 if (bundleOption == nullptr || errCode != ERR_OK) { in SendCancelHiSysEvent()
117 const sptr<NotificationBundleOption> &bundleOption, ErrCode errCode) in SendRemoveHiSysEvent() argument
119 if (bundleOption == nullptr || errCode != ERR_OK) { in SendRemoveHiSysEvent()
[all …]
/base/account/os_account/services/accountmgr/test/unittest/ohos_account/
Dohos_account_data_deal_test.cpp80 ErrCode errCode = dataDeal.AccountInfoFromJson(accountInfo, TEST_VALID_USER_ID); variable
81 EXPECT_EQ(errCode, ERR_ACCOUNT_DATADEAL_NOT_READY);
95 ErrCode errCode = dataDeal.Init(TEST_VALID_USER_ID); variable
96 EXPECT_EQ(errCode, ERR_OK);
98 errCode = dataDeal.AccountInfoFromJson(accountInfo, TEST_VALID_USER_ID);
99 EXPECT_EQ(errCode, ERR_OK);
120 ErrCode errCode = dataDeal.Init(TEST_VALID_USER_ID); variable
121 EXPECT_EQ(errCode, ERR_OK);
126 errCode = dataDeal.AccountInfoFromJson(accountInfo, TEST_VALID_USER_ID);
127 EXPECT_EQ(errCode, ERR_OK);
[all …]
/base/notification/distributed_notification_service/test/bechmarktest/notification_services_test/
Dnotification_service_test.cpp135 ErrCode errCode = advancedNotificationService_->AddSlots(slots); in BENCHMARK_F() local
136 if (errCode != ERR_OK) { in BENCHMARK_F()
154 ErrCode errCode = advancedNotificationService_->AddSlots(slots); in BENCHMARK_F() local
155 if (errCode != ERR_OK) { in BENCHMARK_F()
159errCode = advancedNotificationService_->RemoveSlotByType(NotificationConstant::SlotType::CUSTOM); in BENCHMARK_F()
160 if (errCode != ERR_OK) { in BENCHMARK_F()
177 ErrCode errCode = advancedNotificationService_->Subscribe(subscriber->GetImpl(), info); in BENCHMARK_F() local
178 if (errCode != ERR_OK) { in BENCHMARK_F()
208 ErrCode errCode = advancedNotificationService_->Publish(label, req); in BENCHMARK_F() local
209 if (errCode != ERR_OK) { in BENCHMARK_F()
[all …]
/base/usb/usb_manager/utils/native/include/
Dusb_napi_errors.h42 void ThrowBusinessError(const napi_env &env, int32_t errCode, const std::string &errMsg);
43 napi_value CreateBusinessError(const napi_env &env, int32_t errCode, const std::string &errMsg);
45 #define USB_ASSERT_BASE(env, assertion, errCode, errMsg, retVal) \ argument
49 ThrowBusinessError((env), errCode, errMsg); \
55 #define USB_ASSERT(env, assertion, errCode, errMsg) USB_ASSERT_BASE(env, assertion, errCode, errMsg… argument
56 #define USB_ASSERT_RETURN_VOID(env, assertion, errCode, errMsg) \ argument
57 USB_ASSERT_BASE(env, assertion, errCode, errMsg, NOTHING)
58 #define USB_ASSERT_RETURN_FALSE(env, assertion, errCode, errMsg) USB_ASSERT_BASE(env, assertion, er… argument
59 #define USB_ASSERT_RETURN_UNDEF(env, assertion, errCode, errMsg) \ argument
63 USB_ASSERT_BASE(env, assertion, errCode, errMsg, obj); \
/base/account/os_account/dfx/hisysevent_adapter/
Dhisysevent_adapter.cpp29 void ReportServiceStartFail(int32_t errCode, const std::string& errMsg) in ReportServiceStartFail() argument
34 "ERROR_TYPE", errCode, in ReportServiceStartFail()
37 ACCOUNT_LOGE("hisysevent write failed! ret %{public}d. errCode %{public}d", ret, errCode); in ReportServiceStartFail()
40 (void)errCode; in ReportServiceStartFail()
64 int32_t id, const std::string& operationStr, int32_t errCode, const std::string& errMsg) in ReportOsAccountOperationFail() argument
71 "ERROR_TYPE", errCode, in ReportOsAccountOperationFail()
75 ret, id, operationStr.c_str(), errCode, errMsg.c_str()); in ReportOsAccountOperationFail()
79 (void)errCode; in ReportOsAccountOperationFail()
86 int32_t userId, const std::string& operationStr, int32_t errCode, const std::string& errMsg) in ReportOhosAccountOperationFail() argument
93 "ERROR_TYPE", errCode, in ReportOhosAccountOperationFail()
[all …]
/base/time/time_service/test/unittest/service_test/src/
Dtime_client_test.cpp264 auto errCode = TimeServiceClient::GetInstance()->GetWallTimeMs(time); variable
265 EXPECT_TRUE(errCode == TimeError::E_TIME_OK);
276 auto errCode = TimeServiceClient::GetInstance()->GetWallTimeNs(time); variable
277 EXPECT_TRUE(errCode == TimeError::E_TIME_OK);
288 auto errCode = TimeServiceClient::GetInstance()->GetBootTimeNs(time); variable
289 EXPECT_TRUE(errCode == TimeError::E_TIME_OK);
300 auto errCode = TimeServiceClient::GetInstance()->GetBootTimeMs(time); variable
301 EXPECT_TRUE(errCode == TimeError::E_TIME_OK);
312 auto errCode = TimeServiceClient::GetInstance()->GetMonotonicTimeMs(time); variable
313 EXPECT_TRUE(errCode == TimeError::E_TIME_OK);
[all …]
/base/msdp/device_status/frameworks/js/napi/interaction/cooperate/src/
Djs_cooperate_manager.cpp36 int32_t errCode = 0; in Enable() local
38 errCode = INTERACTION_MGR->PrepareCoordination(callback); in Enable()
40 errCode = INTERACTION_MGR->UnprepareCoordination(callback); in Enable()
42 if (errCode != RET_OK) { in Enable()
43 UtilNapiError::HandleExecuteResult(env, errCode, "enable", COOPERATE_PERMISSION); in Enable()
57 …int32_t errCode = INTERACTION_MGR->ActivateCoordination(remoteNetworkDescriptor, startDeviceId, ca… in Start() local
58 if (errCode != RET_OK) { in Start()
59 UtilNapiError::HandleExecuteResult(env, errCode, "start", COOPERATE_PERMISSION); in Start()
73 int32_t errCode = INTERACTION_MGR->DeactivateCoordination(isUnchained, callback); in Stop() local
74 if (errCode != RET_OK) { in Stop()
[all …]
/base/usb/usb_manager/utils/native/src/
Dusb_napi_errors.cpp24 std::optional<std::string_view> GetErrMsgByErrCode(int32_t errCode) in GetErrMsgByErrCode() argument
26 auto obj = ERRCODE_MSG_MAP.find(errCode); in GetErrMsgByErrCode()
28 USB_HILOGE(MODULE_JS_NAPI, "invalid errCode %{public}d", errCode); in GetErrMsgByErrCode()
34 napi_value CreateBusinessError(const napi_env &env, int32_t errCode, const std::string &errMsg) in CreateBusinessError() argument
36 auto commMsg = GetErrMsgByErrCode(errCode); in CreateBusinessError()
48 NAPI_CALL(env, napi_create_int32(env, errCode, &code)); in CreateBusinessError()
56 void ThrowBusinessError(const napi_env &env, int32_t errCode, const std::string &errMsg) in ThrowBusinessError() argument
59 businessError = CreateBusinessError(env, errCode, errMsg); in ThrowBusinessError()
/base/msdp/device_status/utils/common/src/
Dutil_napi_error.cpp36 void HandleExecuteResult(napi_env env, int32_t errCode, const std::string param1, const std::string… in HandleExecuteResult() argument
38 switch (errCode) { in HandleExecuteResult()
40 THROWERR(env, errCode, param1.c_str(), param2.c_str()); in HandleExecuteResult()
44 THROWERR_CUSTOM(env, errCode, "param is invalid"); in HandleExecuteResult()
49 if (!UtilNapiError::GetErrorMsg(errCode, errMsg)) { in HandleExecuteResult()
53 THROWERR_CUSTOM(env, errCode, errMsg.c_str()); in HandleExecuteResult()
58 if (!UtilNapiError::GetErrorMsg(errCode, errMsg)) { in HandleExecuteResult()
/base/account/os_account/services/accountmgr/test/unittest/account_iam/
Daccount_iam_callback_test.cpp149 int32_t errCode = 0; variable
150 userAuthCallback->OnResult(errCode, extraInfo);
152 errCode = 10; // result != 0
153 userAuthCallback->OnResult(errCode, extraInfo);
154 EXPECT_EQ(errCode, callback->result_);
170 int32_t errCode = 1; variable
171 userAuthCallback->OnResult(errCode, extraInfo);
172 EXPECT_EQ(errCode, callback->result_);
173 errCode = 10; // result != 0 && authType_ != AuthType::PIN
174 userAuthCallback->OnResult(errCode, extraInfo);
[all …]
/base/msdp/device_status/frameworks/js/napi/interaction/coordination/src/
Djs_coordination_manager.cpp36 int32_t errCode = INTERACTION_MGR->PrepareCoordination(callback, isCompatible); in Prepare() local
37 if (errCode != RET_OK) { in Prepare()
38 UtilNapiError::HandleExecuteResult(env, errCode, "prepare", COOPERATE_PERMISSION); in Prepare()
51 int32_t errCode = INTERACTION_MGR->UnprepareCoordination(callback, isCompatible); in Unprepare() local
52 if (errCode != RET_OK) { in Unprepare()
53 UtilNapiError::HandleExecuteResult(env, errCode, "unprepare", COOPERATE_PERMISSION); in Unprepare()
67 int32_t errCode = INTERACTION_MGR->ActivateCoordination( in Activate() local
69 if (errCode != RET_OK) { in Activate()
70 UtilNapiError::HandleExecuteResult(env, errCode, "activate", COOPERATE_PERMISSION); in Activate()
84 int32_t errCode = INTERACTION_MGR->DeactivateCoordination(isUnchained, callback, isCompatible); in Deactivate() local
[all …]
/base/account/os_account/frameworks/domain_account/src/
Ddomain_account_plugin_service.cpp99 ErrCode errCode = CheckAndInitExecEnv(callback, &callbackClient); in IsAccountTokenValid() local
100 if (errCode != ERR_OK) { in IsAccountTokenValid()
101 return errCode; in IsAccountTokenValid()
113 ErrCode errCode = CheckAndInitExecEnv(callback, &callbackClient); in GetAccessToken() local
114 if (errCode != ERR_OK) { in GetAccessToken()
115 return errCode; in GetAccessToken()
142 ErrCode errCode = CheckAndInitExecEnv(callback, &callbackClient); in GetDomainAccountInfo() local
143 if (errCode != ERR_OK) { in GetDomainAccountInfo()
144 return errCode; in GetDomainAccountInfo()
155 ErrCode errCode = CheckAndInitExecEnv(callback, &callbackClient); in OnAccountBound() local
[all …]
/base/telephony/call_manager/services/call_manager_service/include/
Dcall_manager_hisysevent.h40 const int32_t errCode, const std::string &desc);
42 const int32_t errCode, const std::string &desc);
44 const int32_t errCode, const std::string &desc);
46 const int32_t slotId, const int32_t callId, const int32_t errCode, const std::string &desc);
47 void GetErrorDescription(const int32_t errCode, std::string &errordesc);
56 static int32_t ErrorCodeConversion(const int32_t errCode, CallErrorCode &eventValue);
57 static int32_t CallDataErrorCodeConversion(const int32_t errCode, CallErrorCode &eventValue);
58 … static int32_t CallInterfaceErrorCodeConversion(const int32_t errCode, CallErrorCode &eventValue);
59 static int32_t TelephonyErrorCodeConversion(const int32_t errCode, CallErrorCode &eventValue);
/base/telephony/call_manager/services/call_manager_service/src/
Dcall_manager_hisysevent.cpp73 const int32_t videoState, const int32_t errCode, const std::string &desc) in WriteIncomingCallFaultEvent() argument
76 if (ErrorCodeConversion(errCode, value)) { in WriteIncomingCallFaultEvent()
82 …CALL_TYPE_KEY, callType, VIDEO_STATE_KEY, videoState, ERROR_TYPE_KEY, errCode, ERROR_MSG_KEY, desc… in WriteIncomingCallFaultEvent()
87 const int32_t videoState, const int32_t errCode, const std::string &desc) in WriteDialCallFaultEvent() argument
90 if (ErrorCodeConversion(errCode, value)) { in WriteDialCallFaultEvent()
96 …CALL_TYPE_KEY, callType, VIDEO_STATE_KEY, videoState, ERROR_TYPE_KEY, errCode, ERROR_MSG_KEY, desc… in WriteDialCallFaultEvent()
101 const int32_t videoState, const int32_t errCode, const std::string &desc) in WriteAnswerCallFaultEvent() argument
104 if (ErrorCodeConversion(errCode, value)) { in WriteAnswerCallFaultEvent()
110 … CALL_ID_KEY, callId, VIDEO_STATE_KEY, videoState, ERROR_TYPE_KEY, errCode, ERROR_MSG_KEY, desc); in WriteAnswerCallFaultEvent()
115 const int32_t slotId, const int32_t callId, const int32_t errCode, const std::string &desc) in WriteHangUpFaultEvent() argument
[all …]
/base/account/os_account/services/accountmgr/test/unittest/os_account/
Dos_account_inner_account_mgr_cov.cpp227 …int errCode = innerMgrService_->CreateOsAccount(ACCOUNT_NAME, OsAccountType::NORMAL, osAccountInfo… variable
229 ASSERT_EQ(errCode, ERR_OK);
230 errCode = innerMgrService_->SendMsgForAccountDeactivate(osAccountInfo);
231 EXPECT_NE(errCode, ERR_OK);
233 errCode = innerMgrService_->SetOsAccountName(localID, ACCOUNT_SET_NAME);
234 ASSERT_EQ(errCode, ERR_OK);
238 errCode = innerMgrService_->SetOsAccountName(localID, ACCOUNT_SET_NAME);
239 ASSERT_EQ(errCode, ERR_OK);
242 errCode = innerMgrService_->SetOsAccountProfilePhoto(localID, ACCOUNT_PHOTO);
243 ASSERT_EQ(errCode, ERR_OK);
[all …]
/base/sensors/sensor/frameworks/js/napi/src/
Dsensor_napi_error.cpp25 napi_value CreateBusinessError(const napi_env &env, const int32_t errCode, const std::string &errMe… in CreateBusinessError() argument
30 NAPI_CALL(env, napi_create_int32(env, errCode, &code)); in CreateBusinessError()
46 void ThrowErr(const napi_env &env, const int32_t errCode, const std::string &printMsg) in ThrowErr() argument
48 SEN_HILOGE("Message:%{public}s, code:%{public}d", printMsg.c_str(), errCode); in ThrowErr()
49 auto msg = GetNapiError(errCode); in ThrowErr()
51 SEN_HILOGE("ErrCode:%{public}d is invalid", errCode); in ThrowErr()
56 napi_value error = CreateBusinessError(env, errCode, msg.value()); in ThrowErr()
/base/msdp/device_status/frameworks/js/napi/src/
Ddevicestatus_napi_error.cpp29 napi_value CreateNapiError(const napi_env &env, int32_t errCode, const std::string &errMessage) in CreateNapiError() argument
34 NAPI_CALL(env, napi_create_int32(env, errCode, &code)); in CreateNapiError()
51 void ThrowErr(const napi_env &env, int32_t errCode, const std::string &printMsg) in ThrowErr() argument
53 FI_HILOGE("printMsg:%{public}s, errCode:%{public}d", printMsg.c_str(), errCode); in ThrowErr()
54 std::optional<std::string> msg = GetErrMsg(errCode); in ThrowErr()
56 FI_HILOGE("errCode:%{public}d is invalid", errCode); in ThrowErr()
59 napi_value error = CreateNapiError(env, errCode, msg.value()); in ThrowErr()

12345678910>>...14