Home
last modified time | relevance | path

Searched refs:napi_throw_error (Results 1 – 25 of 163) sorted by relevance

1234567

/ohos5.0/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/hyper_graphic_manager/src/
H A Dhyper_graphic_manager_napi.cpp46 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()
108napi_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 Dark_interop_loader.cpp27 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 Djs_base64.cpp55 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 Djs_stringdecoder.cpp39 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 Dpolicy_observer_wrapper.cpp49napi_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()
95napi_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 Dvpn_module_ext.cpp120napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in MakeDataExt()
128napi_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()
164napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in StartVpnExtensionAbility()
171napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parse want erro… in StartVpnExtensionAbility()
212napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parameter error… in StopVpnExtensionAbility()
219napi_throw_error(env, std::to_string(NETMANAGER_EXT_ERR_PARAMETER_ERROR).c_str(), "Parse want erro… in StopVpnExtensionAbility()
245napi_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 Dstatistics_observer_wrapper.cpp47napi_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()
83napi_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 Dinterface_state_observer_wrapper.cpp54napi_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()
94napi_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 Dnetshare_observer_wrapper.cpp50napi_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()
81napi_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 Duse-napi-about-custom-asynchronous-operations.md68 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 Duse-napi-about-property.md107 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 Duse-napi-about-cleanuphook.md81 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.");
170napi_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 Duse-napi-about-error.md25 | 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 Duse-napi-life-cycle.md221 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 Duse-napi-about-promise.md55 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 Dnapi-guidelines.md98 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 Djs_process.cpp90 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()
526napi_throw_error(env, "401", "Parameter error. The type of Parameter must be number and a valid ti… in GetThreadPriority()
587napi_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 Dbusiness_error.cpp37 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 Dmodule_template.cpp46 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 Dmodule_template.h50napi_throw_error(env, std::to_string(context->GetErrorCode()).c_str(), context->GetErrorMessage().… in InterfaceWithoutManager()
86napi_throw_error(env, std::to_string(context->GetErrorCode()).c_str(), context->GetErrorMessage().… in Interface()
127napi_throw_error(env, std::to_string(context->GetErrorCode()).c_str(), context->GetErrorMessage().… in InterfaceSync()
143napi_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 Dnapi_error.cpp58 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 Dnapi_storage_helper.cpp130 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 Daudio_haptic_common_napi.cpp35 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 Dnapi_audio_error.cpp36 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 Duse-napi-about-property.md107 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 …]

1234567