/ohos5.0/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/hyper_graphic_manager/src/ |
H A D | hyper_graphic_manager_napi.cpp | 46 napi_throw_error(env, NULL, "Napi SetRefreshRateMode failed to get argument"); in SetRefreshRateMode() 49 napi_throw_error(env, NULL, "Napi SetRefreshRateMode wrong argument type"); in SetRefreshRateMode() 83 napi_throw_error(env, NULL, "Napi GetScreenSupportedRefreshRates failed to get argument"); in GetScreenSupportedRefreshRates() 86 napi_throw_error(env, NULL, "Napi GetScreenSupportedRefreshRates wrong argument type"); in GetScreenSupportedRefreshRates() 93 napi_throw_error(env, NULL, "Napi GetScreenSupportedRefreshRates illegal screenId input"); in GetScreenSupportedRefreshRates() 102 napi_throw_error(env, NULL, "Napi GetScreenSupportedRefreshRates got a vector too large"); in GetScreenSupportedRefreshRates() 108 …napi_throw_error(env, NULL, "Napi GetScreenSupportedRefreshRates got a rate too above maximal valu… in GetScreenSupportedRefreshRates() 137 napi_throw_error(env, NULL, "Napi SetShowRefreshRateEnable failed to get argument"); in SetShowRefreshRateEnabled() 140 napi_throw_error(env, NULL, "Napi SetShowRefreshRateEnable wrong argument type"); in SetShowRefreshRateEnabled()
|
/ohos5.0/foundation/arkui/napi/interfaces/inner_api/cjffi/ark_interop/ |
H A D | ark_interop_loader.cpp | 27 napi_throw_error(env, "napi call fail", "napi_get_cb_info failed"); in ParseLoadParams() 32 napi_throw_error(env, "argument invalid", "need one argument"); in ParseLoadParams() 39 napi_throw_error(env, "napi call fail", "napi_typeof failed"); in ParseLoadParams() 43 napi_throw_error(env, "argument invalid", "need a string"); in ParseLoadParams() 49 napi_throw_error(env, "argument invalid", "napi_get_value_string_utf8 not ok"); in ParseLoadParams()
|
/ohos5.0/commonlibrary/ets_utils/js_util_module/util/ |
H A D | js_base64.cpp | 55 napi_throw_error(env, "401", in EncodeSync() 62 napi_throw_error(env, "-1", "encode input is null"); in EncodeSync() 88 napi_throw_error(env, "401", in EncodeToStringSync() 223 napi_throw_error(env, "-2", "prolen is error !"); in DecodeSyncInner() 236 napi_throw_error(env, "401", errMsg.c_str()); in DecodeSyncInner() 268 napi_throw_error(env, "-2", "retLen is error !"); in DecodeAchieve() 371 napi_throw_error(env, "401", in Encode() 388 napi_throw_error(env, "401", in EncodeToString() 577 napi_throw_error(env, "401", errMsg.c_str()); in Decode() 591 napi_throw_error(env, "-2", "prolen is error !"); in Decode() [all …]
|
H A D | js_stringdecoder.cpp | 39 napi_throw_error(env, "401", in Write() 51 napi_throw_error(env, ERROR_CODE, "Error obtaining minimum number of input bytes"); in Write() 61 napi_throw_error(env, ERROR_CODE, err.c_str()); in Write() 101 napi_throw_error(env, ERROR_CODE, err.c_str()); in End()
|
/ohos5.0/foundation/communication/netmanager_base/frameworks/js/napi/netpolicy/src/ |
H A D | policy_observer_wrapper.cpp | 49 … napi_throw_error(env, std::to_string(NETMANAGER_ERR_PARAMETER_ERROR).c_str(), "Parameter error"); in On() 66 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in On() 76 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in On() 95 … napi_throw_error(env, std::to_string(NETMANAGER_ERR_PARAMETER_ERROR).c_str(), "Parameter error"); in Off() 116 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in Off() 128 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in Off()
|
/ohos5.0/foundation/communication/netmanager_ext/frameworks/js/napi/vpnext/src/ |
H A D | vpn_module_ext.cpp | 120 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in MakeDataExt() 128 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in MakeDataExt() 136 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in MakeDataExt() 164 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in StartVpnExtensionAbility() 171 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parse want erro… in StartVpnExtensionAbility() 212 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in StopVpnExtensionAbility() 219 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parse want erro… in StopVpnExtensionAbility() 245 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in UpdateVpnAuthorize()
|
/ohos5.0/foundation/communication/netmanager_base/frameworks/js/napi/netstats/src/ |
H A D | statistics_observer_wrapper.cpp | 47 … napi_throw_error(env, std::to_string(NETMANAGER_ERR_PARAMETER_ERROR).c_str(), "Parameter error"); in On() 63 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in On() 83 … napi_throw_error(env, std::to_string(NETMANAGER_ERR_PARAMETER_ERROR).c_str(), "Parameter error"); in Off() 110 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in Off()
|
/ohos5.0/foundation/communication/netmanager_ext/frameworks/js/napi/ethernet/ |
H A D | interface_state_observer_wrapper.cpp | 54 … napi_throw_error(env, std::to_string(NETMANAGER_ERR_PARAMETER_ERROR).c_str(), "Parameter error"); in On() 70 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in On() 94 … napi_throw_error(env, std::to_string(NETMANAGER_ERR_PARAMETER_ERROR).c_str(), "Parameter error"); in Off() 121 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in Off()
|
/ohos5.0/foundation/communication/netmanager_ext/frameworks/js/napi/sharing/src/ |
H A D | netshare_observer_wrapper.cpp | 50 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in On() 64 napi_throw_error(env, std::to_string(ret).c_str(), errorMsg.c_str()); in On() 81 …napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in Off() 110 napi_throw_error(env, std::to_string(result).c_str(), errorMsg.c_str()); in Off()
|
/ohos5.0/docs/zh-cn/application-dev/napi/ |
H A D | use-napi-about-custom-asynchronous-operations.md | 68 napi_throw_error(env, nullptr, "napi_async_init fail"); 75 napi_throw_error(env, nullptr, "napi_open_callback_scope fail"); 83 napi_throw_error(env, nullptr, "Unexpected argument type"); 89 napi_throw_error(env, nullptr, "napi_close_callback_scope fail");
|
H A D | use-napi-about-property.md | 107 napi_throw_error(env, nullptr, "Node-API napi_get_cb_info fail"); 112 napi_throw_error(env, nullptr, "Node-API napi_set_property fail"); 164 napi_throw_error(env, nullptr, "Node-API napi_get_property fail"); 215 napi_throw_error(env, nullptr, "Node-API napi_has_property fail"); 274 napi_throw_error(env, nullptr, "Expects an object as argument."); 336 napi_throw_error(env, nullptr, "First argument must be an object."); 343 napi_throw_error(env, nullptr, "Second argument must be a string."); 350 napi_throw_error(env, nullptr, "napi_has_own_property failed"); 411 napi_throw_error(env, nullptr, "napi_set_named_property failed"); 461 napi_throw_error(env, nullptr, "napi_get_named_property failed"); [all …]
|
H A D | use-napi-about-cleanuphook.md | 81 napi_throw_error(env, nullptr, "Test Node-API napi_add_env_cleanup_hook failed."); 87 napi_throw_error(env, nullptr, "Test Node-API napi_add_env_cleanup_hook failed."); 170 … napi_throw_error(asyncData->env, nullptr, "Test Node-API napi_remove_async_cleanup_hook failed"); 212 napi_throw_error(env, nullptr, "Test Node-API data->testData is nullptr"); 217 napi_throw_error(env, nullptr, "Test Node-API napi_add_async_cleanup_hook failed");
|
H A D | use-napi-about-error.md | 25 | napi_throw_error、napi_throw_type_error、napi_throw_range_error | 当在C/C++中出现了错误或异常情况时,可以使用这些函数来抛出Ar… 221 ### napi_throw_error subsection 233 napi_throw_error(env, nullptr, "napi_throw_error throwing an error"); 249 napi_throw_error(env, "DIVIDE_BY_ZERO", "Cannot divide by zero"); 271 …hilog.error(0x0000, 'testTag', 'Test Node-API napi_throw_error error code: %{public}s , message: %… 276 …hilog.error(0x0000, 'testTag', 'Test Node-API napi_throw_error errorCode: %{public}s , errorManage… 465 napi_throw_error(env, "napi_create_error errorCode", "napi_create_error errorMessage"); 507 napi_throw_error(env, "napi_create_error errorCode", "napi_create_error errorMessage");
|
H A D | use-napi-life-cycle.md | 221 napi_throw_error(env, nullptr, "napi_create_reference fail"); 233 napi_throw_error(env, nullptr, "napi_reference_ref fail"); 245 napi_throw_error(env, nullptr, "napi_get_reference_value fail"); 261 napi_throw_error(env, nullptr, "napi_reference_unref fail"); 267 napi_throw_error(env, nullptr, "napi_delete_reference fail");
|
H A D | use-napi-about-promise.md | 55 napi_throw_error(env, nullptr, "Node-API napi_is_promise failed"); 100 napi_throw_error(env, "500", "common error"); 130 napi_throw_error(env, nullptr, "Create promise failed"); 156 napi_throw_error(env, nullptr, "Create promise failed");
|
H A D | napi-guidelines.md | 98 napi_throw_error(env, ...); 104 napi_throw_error(env, ...); 121 napi_throw_error(env, ...); 127 napi_throw_error(env, ...); 133 napi_throw_error(env, ...);
|
/ohos5.0/commonlibrary/ets_utils/js_sys_module/process/ |
H A D | js_process.cpp | 90 napi_throw_error(env, "-1", "getgroups initialize failed"); in GetGroups() 96 napi_throw_error(env, "-1", "getgroups"); in GetGroups() 152 napi_throw_error(env, "-1", "chdir"); in Chdir() 166 napi_throw_error(env, "0", "process exit"); in Kill() 188 napi_throw_error(env, "-1", "Failed to get systimer"); in Uptime() 208 napi_throw_error(env, "1", "uv_cwd"); in Cwd() 408 napi_throw_error(env, "-1", "Invalid tid"); in GetThreadPriority() 457 napi_throw_error(env, nullptr, "ClearReference failed"); in ClearReference() 526 …napi_throw_error(env, "401", "Parameter error. The type of Parameter must be number and a valid ti… in GetThreadPriority() 587 …napi_throw_error(env, "401", "Parameter error. The type of signal must be number,and from 1 to 64.… in Kill()
|
/ohos5.0/base/web/webview/interfaces/kits/napi/common/ |
H A D | business_error.cpp | 37 napi_throw_error(env, std::to_string(errCode).c_str(), GetErrMsgByErrCode(errCode).c_str()); in ThrowErrorByErrcode() 42 napi_throw_error(env, std::to_string(errCode).c_str(), errorMsg.c_str()); in ThrowErrorByErrcode()
|
/ohos5.0/foundation/communication/netstack/utils/napi_utils/src/ |
H A D | module_template.cpp | 46 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in OnManagerWrapper() 124 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in OffManagerWrapper() 130 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in OffManagerWrapper() 176 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in OnSharedManager() 254 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in OffSharedManager() 260 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in OffSharedManager() 306 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in On() 362 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in Off() 368 napi_throw_error(env, std::to_string(PARSE_ERROR_CODE).c_str(), PARSE_ERROR_MSG); in Off()
|
/ohos5.0/foundation/communication/netmanager_base/utils/napi_utils/include/ |
H A D | module_template.h | 50 …napi_throw_error(env, std::to_string(context->GetErrorCode()).c_str(), context->GetErrorMessage().… in InterfaceWithoutManager() 86 …napi_throw_error(env, std::to_string(context->GetErrorCode()).c_str(), context->GetErrorMessage().… in Interface() 127 …napi_throw_error(env, std::to_string(context->GetErrorCode()).c_str(), context->GetErrorMessage().… in InterfaceSync() 143 …napi_throw_error(env, std::to_string(context->GetErrorCode()).c_str(), context->GetErrorMessage().… in InterfaceSync()
|
/ohos5.0/foundation/multimedia/media_library/frameworks/js/src/ |
H A D | napi_error.cpp | 58 NAPI_CALL_RETURN_VOID(env, napi_throw_error(env, to_string(err).c_str(), message.c_str())); in ThrowError() 73 NAPI_CALL_RETURN_VOID(env, napi_throw_error(env, to_string(err).c_str(), message.c_str())); in ThrowError()
|
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/js/napi/storage/src/ |
H A D | napi_storage_helper.cpp | 130 napi_throw_error(env, nullptr, "Input path error"); in DeleteStorageSync() 136 napi_throw_error(env, std::to_string(errCode).c_str(), "deleteStorage failed"); in DeleteStorageSync() 175 napi_throw_error(env, nullptr, "Input path error"); in RemoveStorageFromCacheSync() 182 napi_throw_error(env, std::to_string(errCode).c_str(), "removeStorageFromCache failed"); in RemoveStorageFromCacheSync()
|
/ohos5.0/foundation/multimedia/player_framework/frameworks/js/audio_haptic/src/ |
H A D | audio_haptic_common_napi.cpp | 35 napi_throw_error(env, (std::to_string(code)).c_str(), messageValue.c_str()); in ThrowError() 40 napi_throw_error(env, (std::to_string(code)).c_str(), errMessage.c_str()); in ThrowError()
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/js/napi/common/ |
H A D | napi_audio_error.cpp | 36 napi_throw_error(env, (std::to_string(code)).c_str(), messageValue.c_str()); in ThrowError() 47 napi_throw_error(env, (std::to_string(code)).c_str(), messageValue.c_str()); in ThrowError()
|
/ohos5.0/docs/en/application-dev/napi/ |
H A D | use-napi-about-property.md | 107 napi_throw_error(env, nullptr, "Node-API napi_get_cb_info fail"); 112 napi_throw_error(env, nullptr, "Node-API napi_set_property fail"); 164 napi_throw_error(env, nullptr, "Node-API napi_get_property fail"); 215 napi_throw_error(env, nullptr, "Node-API napi_has_property fail"); 274 napi_throw_error(env, nullptr, "Expects an object as argument."); 336 napi_throw_error(env, nullptr, "First argument must be an object."); 343 napi_throw_error(env, nullptr, "Second argument must be a string."); 350 napi_throw_error(env, nullptr, "napi_has_own_property failed"); 411 napi_throw_error(env, nullptr, "napi_set_named_property failed"); 461 napi_throw_error(env, nullptr, "napi_get_named_property failed"); [all …]
|