Home
last modified time | relevance | path

Searched refs:JsErrorCode (Results 1 – 25 of 26) sorted by relevance

12

/ohos5.0/base/telephony/core_service/frameworks/js/napi/
H A Dnapi_util.h67 static bool CreateParameterErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
69 static bool CreateSimErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
70 static bool CreateSmsErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
71 static bool CreateObserverErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
72 static bool CreateCommonErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
75 static bool CreateCommonSystemErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
76 static bool CreateCallErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
77 static bool CreateCommonCallErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
78 static bool CreateVideoCallErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
80 static bool CreateDataErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode);
[all …]
H A Dnapi_util.cpp69 { JsErrorCode::JS_ERROR_TELEPHONY_SUCCESS, JS_ERROR_TELEPHONY_SUCCESS_STRING },
73 { JsErrorCode::JS_ERROR_TELEPHONY_NO_SIM_CARD, JS_ERROR_TELEPHONY_NO_SIM_CARD_STRING },
75 { JsErrorCode::JS_ERROR_SIM_BASE_ERROR, JS_ERROR_SIM_BASE_ERROR_STRING },
78 { JsErrorCode::JS_ERROR_OPERATOR_CONFIG_ERROR, JS_ERROR_OPERATOR_CONFIG_ERROR_STRING },
84 { JsErrorCode::JS_ERROR_SMS_MMS_BASE_ERROR, JS_ERROR_SMS_MMS_BASE_ERROR_STRING },
86 { JsErrorCode::JS_ERROR_TELEPHONY_AIRPLANE_MODE_ON, JS_ERROR_AIRPLANE_MODE_ON_STRING },
472 bool NapiUtil::CreateVcardErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode) in CreateVcardErrorMessageForJs()
487 bool NapiUtil::CreateSimErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode) in CreateSimErrorMessageForJs()
513 bool NapiUtil::CreateSmsErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode) in CreateSmsErrorMessageForJs()
654 bool NapiUtil::CreateCallErrorMessageForJs(int32_t errorCode, JsErrorCode &jsErrorCode) in CreateCallErrorMessageForJs()
[all …]
H A Djs_error_code.h28 enum JsErrorCode { enum
182 JsErrorCode errorCode = JsErrorCode::JS_ERROR_TELEPHONY_UNKNOW_ERROR;
/ohos5.0/base/time/time_service/framework/js/napi/system_date_time/src/
H A Dnapi_system_date_time.cpp91 if (innerCode != JsErrorCode::ERROR_OK) { in SetTime()
137 if (innerCode != JsErrorCode::ERROR_OK) { in SetDate()
174 if (innerCode != JsErrorCode::ERROR_OK) { in GetRealActiveTime()
215 if (innerCode != JsErrorCode::ERROR_OK) { in GetCurrentTime()
250 if (innerCode != JsErrorCode::ERROR_OK) { in GetTime()
290 if (innerCode != JsErrorCode::ERROR_OK) { in GetRealTime()
340 if (innerCode != JsErrorCode::ERROR_OK) { in GetUptime()
363 if (innerCode != JsErrorCode::ERROR_OK) { in GetDate()
394 if (innerCode != JsErrorCode::ERROR_OK) { in SetTimezone()
416 if (innerCode != JsErrorCode::ERROR_OK) { in GetTimezone()
[all …]
/ohos5.0/base/time/time_service/framework/js/napi/system_timer/src/
H A Dnapi_system_timer.cpp150 JsErrorCode::PARAMETER_ERROR); in ParseTimerOptions()
163 "interval number must >= 0.", JsErrorCode::PARAMETER_ERROR); in ParseTimerOptions()
168 "wantAgent can not be nullptr.", JsErrorCode::PARAMETER_ERROR); in ParseTimerOptions()
232 createTimerContext->errMessage, JsErrorCode::PARAMETER_ERROR); in CreateTimer()
239 if (innerCode != JsErrorCode::ERROR_OK) { in CreateTimer()
266 "The type of 'timerId' must be number", JsErrorCode::PARAMETER_ERROR); in StartTimer()
271 "The type of 'triggerTime' must be number", JsErrorCode::PARAMETER_ERROR); in StartTimer()
279 if (innerCode != JsErrorCode::ERROR_OK) { in StartTimer()
301 "The type of 'timerId' must be number", JsErrorCode::PARAMETER_ERROR); in StopTimer()
307 if (innerCode != JsErrorCode::ERROR_OK) { in StopTimer()
[all …]
/ohos5.0/foundation/distributeddatamgr/relational_store/frameworks/js/napi/cloud_data/src/
H A Djs_error_utils.cpp24 using JsErrorCode = OHOS::CloudData::JsErrorCode; typedef
26 static constexpr JsErrorCode JS_ERROR_CODE_MSGS[] = {
33 const std::optional<JsErrorCode> GetJsErrorCode(int32_t errorCode) in GetJsErrorCode()
35 auto jsErrorCode = JsErrorCode{ errorCode, -1, "" }; in GetJsErrorCode()
38 [](const JsErrorCode &jsErrorCode1, const JsErrorCode &jsErrorCode2) { in GetJsErrorCode()
74 JsErrorCode napiError; in ThrowNapiError()
/ohos5.0/foundation/distributeddatamgr/relational_store/frameworks/js/napi/relationalstore/src/
H A Dnapi_rdb_error.cpp22 using JsErrorCode = OHOS::RelationalStoreJsKit::JsErrorCode; typedef
23 static constexpr JsErrorCode JS_ERROR_CODE_MSGS[] = {
58 const std::optional<JsErrorCode> GetJsErrorCode(int32_t errorCode) in GetJsErrorCode()
60 auto jsErrorCode = JsErrorCode{ errorCode, -1, "" }; in GetJsErrorCode()
63 [](const JsErrorCode &jsErrorCode1, const JsErrorCode &jsErrorCode2) { in GetJsErrorCode()
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/
H A Djs_error_utils.cpp22 using JsErrorCode = OHOS::DistributedKVStore::JsErrorCode; typedef
24 static constexpr JsErrorCode JS_ERROR_CODE_MSGS[] = {
39 const std::optional<JsErrorCode> GetJsErrorCode(int32_t errorCode) in GetJsErrorCode()
41 auto jsErrorCode = JsErrorCode{ errorCode, -1, "" }; in GetJsErrorCode()
44 [](const JsErrorCode &jsErrorCode1, const JsErrorCode &jsErrorCode2) { in GetJsErrorCode()
80 JsErrorCode napiError; in ThrowNapiError()
/ohos5.0/base/theme/screenlock_mgr/frameworks/js/napi/src/
H A Dnapi_screenlock_ability.cpp47 { E_SCREENLOCK_NO_PERMISSION, JsErrorCode::ERR_NO_PERMISSION },
50 { E_SCREENLOCK_NULLPTR, JsErrorCode::ERR_SERVICE_ABNORMAL },
52 { E_SCREENLOCK_NOT_FOCUS_APP, JsErrorCode::ERR_ILLEGAL_USE },
53 { E_SCREENLOCK_NOT_SYSTEM_APP, JsErrorCode::ERR_NOT_SYSTEM_APP },
56 { JsErrorCode::ERR_NO_PERMISSION, PERMISSION_VALIDATION_FAILED },
57 { JsErrorCode::ERR_INVALID_PARAMS, PARAMETER_VALIDATION_FAILED },
58 { JsErrorCode::ERR_CANCEL_UNLOCK, CANCEL_UNLOCK_OPERATION },
59 { JsErrorCode::ERR_SERVICE_ABNORMAL, SERVICE_IS_ABNORMAL },
60 { JsErrorCode::ERR_ILLEGAL_USE, ILLEGAL_USE },
61 { JsErrorCode::ERR_NOT_SYSTEM_APP, NON_SYSTEM_APP },
[all …]
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/js/napi/common/src/
H A Dnapi_preferences_error.cpp20 static constexpr JsErrorCode JS_ERROR_MAPS[] = {
30 const std::optional<JsErrorCode> GetJsErrorCode(int32_t errorCode) in GetJsErrorCode()
32 auto jsErrorCode = JsErrorCode{ errorCode, -1, "" }; in GetJsErrorCode()
34 jsErrorCode, [](const JsErrorCode &jsErrorCode1, const JsErrorCode &jsErrorCode2) { in GetJsErrorCode()
/ohos5.0/base/time/time_service/framework/js/napi/common/src/
H A Dnapi_utils.cpp32 return JsErrorCode::SYSTEM_APP_ERROR; in ConvertErrorCode()
34 return JsErrorCode::PERMISSION_ERROR; in ConvertErrorCode()
36 return JsErrorCode::PARAMETER_ERROR; in ConvertErrorCode()
38 return JsErrorCode::NTP_UPDATE_ERROR; in ConvertErrorCode()
40 return JsErrorCode::NTP_NOT_UPDATE_ERROR; in ConvertErrorCode()
42 return JsErrorCode::ERROR; in ConvertErrorCode()
105 if (errCode == JsErrorCode::ERROR_OK) { in GetCallbackErrorValue()
110 if (errCode == JsErrorCode::ERROR) { in GetCallbackErrorValue()
132 if (errorCode == JsErrorCode::ERROR_OK) { in SetPromise()
166 …return GetCallbackErrorValue(env, ERROR, NapiUtils::GetErrorMessage(JsErrorCode::PARAMETER_ERROR)); in JSParaError()
[all …]
H A Dnapi_work.cpp44 …CHECK_STATUS_RETURN_VOID(TIME_MODULE_JS_NAPI, this, "napi_get_cb_info failed!", JsErrorCode::PARAM… in GetCbInfo()
46 JsErrorCode::PARAMETER_ERROR); in GetCbInfo()
48 JsErrorCode::PARAMETER_ERROR); in GetCbInfo()
58 …CHECK_STATUS_RETURN_VOID(TIME_MODULE_JS_NAPI, this, "ref callback failed!", JsErrorCode::PARAMETER… in GetCbInfo()
70 JsErrorCode::PARAMETER_ERROR); in GetCbInfo()
143 if (jsErrorCode != JsErrorCode::ERROR) { in GenerateOutput()
205 if (jsErrorCode != JsErrorCode::ERROR) { in GenerateOutputSync()
/ohos5.0/base/time/time_service/framework/js/napi/common/include/
H A Dnapi_utils.h101 enum JsErrorCode : int32_t { enum
115 int errorCode = JsErrorCode::ERROR_OK;
120 …{ JsErrorCode::SYSTEM_APP_ERROR, "Permission verification failed. A non-system application calls a…
121 { JsErrorCode::PARAMETER_ERROR, "Parameter error" },
122 { JsErrorCode::PERMISSION_ERROR, "Permission denied" },
123 { JsErrorCode::ERROR, "Parameter check failed, permission denied, or system error." },
/ohos5.0/foundation/distributeddatamgr/relational_store/frameworks/js/napi/cloud_data/include/
H A Djs_error_utils.h30 struct JsErrorCode { struct
36 const std::optional<JsErrorCode> GetJsErrorCode(int32_t errorCode); argument
39 napi_value GenerateErrorMsg(napi_env env, JsErrorCode jsInfo);
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/include/
H A Djs_error_utils.h29 struct JsErrorCode { struct
35 const std::optional<JsErrorCode> GetJsErrorCode(int32_t errorCode); argument
38 napi_value GenerateErrorMsg(napi_env env, JsErrorCode jsInfo);
/ohos5.0/base/security/access_token/interfaces/kits/napi/accesstoken/src/
H A Dnapi_atmanager.cpp387 JsErrorCode::JS_ERROR_PARAM_ILLEGAL, "Parameter is missing.")), false); in ParseInputVerifyPermissionOrGetFlag()
671 GetErrorMessage(JsErrorCode::JS_ERROR_PARAM_ILLEGAL))), false); in ParseInputGrantOrRevokePermission()
975 JsErrorCode::JS_ERROR_PARAM_ILLEGAL, "Parameter is missing.")), false); in ParseInputSetToggleStatus()
1010 JsErrorCode::JS_ERROR_PARAM_ILLEGAL, "Parameter is missing.")), false); in ParseInputGetToggleStatus()
1137 napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)); in FillPermStateChangeInfo()
1143 napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)); in FillPermStateChangeInfo()
1149 napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)); in FillPermStateChangeInfo()
1206 napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)); in ParseInputToRegister()
1230 std::string errMsg = GetErrorMessage(JsErrorCode::JS_ERROR_PARAM_INVALID); in RegisterPermStateChangeCallback()
1274 napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)); in ParseInputToUnregister()
[all …]
H A Dnapi_request_permission.cpp279 int32_t result = JsErrorCode::JS_OK; in ResultCallbackJSThreadWorker()
632 JsErrorCode::JS_ERROR_PARAM_ILLEGAL, "Parameter is missing.")), false); in ParseRequestPermissionFromUser()
642 …env, napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), fal… in ParseRequestPermissionFromUser()
652 …env, napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), fal… in ParseRequestPermissionFromUser()
660 … napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)); in ParseRequestPermissionFromUser()
728 (asyncContextHandle->asyncContextPtr->result == JsErrorCode::JS_OK)) { in RequestPermissionsFromUserComplete()
736 if (asyncContextHandle->asyncContextPtr->result == JsErrorCode::JS_OK) { in RequestPermissionsFromUserComplete()
795 … GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, "Parameter is missing.")), false); in ParseInputToGetQueryResult()
805 … napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), false); in ParseInputToGetQueryResult()
813 …env, napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), fal… in ParseInputToGetQueryResult()
[all …]
H A Dnapi_request_global_switch_on_setting.cpp396 JsErrorCode::JS_ERROR_PARAM_ILLEGAL, "Parameter is missing.")), false); in ParseRequestGlobalSwitch()
406 …env, napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), fal… in ParseRequestGlobalSwitch()
415 …env, napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), fal… in ParseRequestGlobalSwitch()
455 if (asyncContextHandle->asyncContextPtr->result != JsErrorCode::JS_OK) { in RequestGlobalSwitchExecute()
H A Dnapi_request_permission_on_setting.cpp419 JsErrorCode::JS_ERROR_PARAM_ILLEGAL, "Parameter is missing.")), false); in ParseRequestPermissionOnSetting()
429 …env, napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), fal… in ParseRequestPermissionOnSetting()
439 …env, napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), fal… in ParseRequestPermissionOnSetting()
479 if (asyncContextHandle->asyncContextPtr->result != JsErrorCode::JS_OK) { in RequestPermissionOnSettingExecute()
/ohos5.0/base/time/time_service/framework/js/napi/system_time/src/
H A Djs_systemtime.cpp97 asyncContext->errorCode = JsErrorCode::ERROR; in JSSystemTimeSetTime()
148 asyncContext->errorCode = JsErrorCode::ERROR; in JSSystemTimeSetTimeZone()
207 asyncContext->errorCode = JsErrorCode::ERROR; in JSSystemTimeGetCurrentTime()
260 asyncContext->errorCode = JsErrorCode::ERROR; in JSSystemTimeGetRealActiveTime()
313 asyncContext->errorCode = JsErrorCode::ERROR; in JSSystemTimeGetRealTime()
360 asyncContext->errorCode = JsErrorCode::ERROR; in JSSystemTimeGetDate()
407 asyncContext->errorCode = JsErrorCode::ERROR; in JSSystemTimeGetTimeZone()
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/js/napi/common/include/
H A Dnapi_preferences_error.h40 struct JsErrorCode { struct
46 const std::optional<JsErrorCode> GetJsErrorCode(int32_t errorCode); argument
/ohos5.0/foundation/distributeddatamgr/relational_store/frameworks/js/napi/relationalstore/include/
H A Dnapi_rdb_error.h36 struct JsErrorCode { struct
41 const std::optional<JsErrorCode> GetJsErrorCode(int32_t errorCode); argument
/ohos5.0/base/security/dlp_permission_service/interfaces/kits/napi_common/include/
H A Dnapi_error_msg.h24 enum JsErrorCode : int32_t { enum
/ohos5.0/base/security/access_token/interfaces/kits/napi/common/include/
H A Dnapi_error.h48 } JsErrorCode; typedef
/ohos5.0/base/theme/screenlock_mgr/interfaces/inner_api/include/
H A Dscreenlock_common.h86 enum JsErrorCode : uint32_t { enum

12