/base/account/os_account/interfaces/kits/napi/common/src/ |
H A D | napi_account_error.cpp | 79 napi_value GenerateBusinessError(napi_env env, int32_t jsErrCode, const std::string &jsErrMsg) in GenerateBusinessError() function 124 napi_value GenerateBusinessError(napi_env env, int32_t nativeErrCode, bool throwErr) in GenerateBusinessError() function 127 return GenerateBusinessError(env, nativeErrCode); in GenerateBusinessError() 132 napi_value GenerateBusinessError(napi_env env, int32_t nativeErrCode) in GenerateBusinessError() function 141 return GenerateBusinessError(env, jsErrCode, jsErrMsg); in GenerateBusinessError() 156 napi_throw(env, GenerateBusinessError(env, nativeErrCode)); in AccountNapiThrow() 163 napi_throw(env, GenerateBusinessError(env, jsErrCode, jsErrMsg)); in AccountNapiThrow() 170 napi_throw(env, GenerateBusinessError(env, jsErrCode, ConvertToJsErrMsg(jsErrCode))); in AccountIAMNapiThrow()
|
/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
H A D | napi_pri_key.cpp | 72 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap napiPriKey obj!")); in JsGetEncoded() 79 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get priKey obj!")); in JsGetEncoded() 87 napi_throw(env, GenerateBusinessError(env, res, "c getEncoded fail.")); in JsGetEncoded() 95 napi_throw(env, GenerateBusinessError(env, res, "covert blob to napi value failed.")); in JsGetEncoded() 112 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The input args num is invalid.")); in JsGetEncodedPem() 119 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get formatStr.")); in JsGetEncodedPem() 127 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap napiPriKey obj!")); in JsGetEncodedPem() 134 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get priKey obj!")); in JsGetEncodedPem() 142 napi_throw(env, GenerateBusinessError(env, res, "getEncodedPem fail.")); in JsGetEncodedPem() 158 napi_throw(env, GenerateBusinessError(en in JsClearMem() [all...] |
H A D | napi_ecc_key_util.cpp | 42 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The input args num is invalid.")); in JsGenECCCommonParamsSpec() 49 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get algoName.")); in JsGenECCCommonParamsSpec() 56 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "create c generator fail.")); in JsGenECCCommonParamsSpec() 75 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The input args num is invalid.")); in JsConvertPoint() 82 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get curveName.")); in JsConvertPoint() 89 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get point blob.")); in JsConvertPoint() 99 napi_throw(env, GenerateBusinessError(env, ret, "failed to convert point.")); in JsConvertPoint() 118 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The input args num is invalid.")); in JsGetEncodedPoint() 125 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get curveName.")); in JsGetEncodedPoint() 132 napi_throw(env, GenerateBusinessError(en in JsGetEncodedPoint() [all...] |
H A D | napi_pub_key.cpp | 72 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap napiPubKey obj!")); in JsGetEncoded() 79 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get pubKey obj!")); in JsGetEncoded() 87 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "c getEncoded fail.")); in JsGetEncoded() 95 napi_throw(env, GenerateBusinessError(env, res, "covert blob to napi value failed.")); in JsGetEncoded() 113 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "JsGetEncodedDer fail, wrong argument num.")); in JsGetEncodedDer() 119 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get format.")); in JsGetEncodedDer() 125 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap napiPubKeyDer obj!")); in JsGetEncodedDer() 132 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get pubKeyDer obj!")); in JsGetEncodedDer() 140 napi_throw(env, GenerateBusinessError(env, res, "c getEncodedDer fail.")); in JsGetEncodedDer() 147 napi_throw(env, GenerateBusinessError(en in JsGetEncodedDer() [all...] |
H A D | napi_rand.cpp | 89 businessError = GenerateBusinessError(env, context->errCode, context->errMsg); in ReturnCallbackResult() 108 GenerateBusinessError(env, context->errCode, context->errMsg)); in ReturnPromiseResult() 233 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "malloc context failed")); in JsGenerateRandom() 239 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context fail.")); in JsGenerateRandom() 258 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "invalid params count")); in JsGenerateRandomSync() 265 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "get numBytes failed!")); in JsGenerateRandomSync() 271 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap NapiRand obj!")); in JsGenerateRandomSync() 277 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "fail to get rand obj!")); in JsGenerateRandomSync() 285 napi_throw(env, GenerateBusinessError(env, res, "generateRandom failed!")); in JsGenerateRandomSync() 305 napi_throw(env, GenerateBusinessError(en in JsSetSeed() [all...] |
H A D | napi_sym_key_generator.cpp | 173 GenerateBusinessError(env, context->errCode, context->errMsg)); in ReturnPromiseResult() 181 businessError = GenerateBusinessError(env, context->errCode, context->errMsg); in ReturnCallbackResult() 217 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "new napi sym key failed.")); in AsyncKeyReturn() 335 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "new napi sym key failed.")); in napiGetInstance() 361 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "Create context failed!")); in JsGenerateSymKey() 367 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "Build context fail.")); in JsGenerateSymKey() 389 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "failed to unwrap NapiSymKeyGenerator obj.")); in JsGenerateSymKeySync() 396 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "failed to get generator obj.")); in JsGenerateSymKeySync() 404 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "generate sym key failed.")); in JsGenerateSymKeySync() 411 napi_throw(env, GenerateBusinessError(en in JsGenerateSymKeySync() [all...] |
H A D | napi_key.cpp | 47 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap napi key obj.")); in JsGetAlgorithm() 53 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "fail to get key obj!")); in JsGetAlgorithm() 72 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap napi key obj.")); in JsGetFormat() 78 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "fail to get key obj!")); in JsGetFormat() 97 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap napi key obj.")); in JsGetEncoded() 103 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "fail to get key obj!")); in JsGetEncoded() 111 napi_throw(env, GenerateBusinessError(env, res, "getEncoded failed.")); in JsGetEncoded()
|
H A D | napi_sm2_crypto_util.cpp | 118 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The input args num is invalid.")); in JsGenCipherTextBySpec() 124 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get spec.")); in JsGenCipherTextBySpec() 132 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get mode.")); in JsGenCipherTextBySpec() 140 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "Failed to allocate memory.")); in JsGenCipherTextBySpec() 148 napi_throw(env, GenerateBusinessError(env, res, "gen cipher text by spec fail.")); in JsGenCipherTextBySpec() 219 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "Invalid spec!")); in ConvertSm2CipherTextSpecToNapiValue() 226 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "create object failed!")); in ConvertSm2CipherTextSpecToNapiValue() 231 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build object failed!")); in ConvertSm2CipherTextSpecToNapiValue() 246 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The input args num is invalid.")); in JsGetCipherTextSpec() 252 napi_throw(env, GenerateBusinessError(en in JsGetCipherTextSpec() [all...] |
H A D | napi_asy_key_spec_generator.cpp | 128 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnAsyKeyCallbackResult() 148 GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnAsyKeyPromiseResult() 171 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "new napi key pair failed!")); in GenKeyPairAsyncWorkReturn() 221 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "new napi pub key failed!")); in PubKeyAsyncWorkReturn() 273 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "new napi pri key failed!")); in PriKeyAsyncWorkReturn() 403 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "create context fail!")); in JsGenerateKeyPair() 409 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context fail!")); in JsGenerateKeyPair() 423 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build generator fail!")); in JsGenerateKeyPairSync() 431 napi_throw(env, GenerateBusinessError(env, errCode, "generate key pair fail.")); in JsGenerateKeyPairSync() 440 napi_throw(env, GenerateBusinessError(en in JsGenerateKeyPairSync() [all...] |
H A D | napi_md.cpp | 89 businessError = GenerateBusinessError(env, context->errCode, context->errMsg); in ReturnCallbackResult() 107 GenerateBusinessError(env, context->errCode, context->errMsg)); in ReturnPromiseResult() 313 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "malloc context failed")); in JsMdUpdate() 319 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context fail.")); in JsMdUpdate() 338 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "invalid parameters.")); in JsMdUpdateSync() 344 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "invalid parameters.")); in JsMdUpdateSync() 350 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "invalid parameters.")); in JsMdUpdateSync() 358 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "md is nullptr!")); in JsMdUpdateSync() 366 napi_throw(env, GenerateBusinessError(env, HCF_ERR_CRYPTO_OPERATION, "crypto operation error.")); in JsMdUpdateSync() 382 napi_throw(env, GenerateBusinessError(en in JsMdDoFinal() [all...] |
H A D | napi_dh_key_util.cpp | 41 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The input args num is invalid.")); in JsGenDHCommonParamsSpec() 48 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get pLen.")); in JsGenDHCommonParamsSpec() 56 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to get skLen.")); in JsGenDHCommonParamsSpec() 63 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "create c generator fail.")); in JsGenDHCommonParamsSpec()
|
H A D | napi_mac.cpp | 96 businessError = GenerateBusinessError(env, context->errCode, context->errMsg); in ReturnCallbackResult() 115 GenerateBusinessError(env, context->errCode, context->errMsg)); in ReturnPromiseResult() 417 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "malloc context failed")); in JsMacInit() 423 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context fail.")); in JsMacInit() 441 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The input args num is invalid.")); in JsMacInitSync() 448 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "napiSysKey is null!")); in JsMacInitSync() 455 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "failed to unwrap napiMac obj!")); in JsMacInitSync() 461 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "mac is nullptr!")); in JsMacInitSync() 467 napi_throw(env, GenerateBusinessError(env, HCF_ERR_CRYPTO_OPERATION, "mac init failed!")); in JsMacInitSync() 479 napi_throw(env, GenerateBusinessError(en in JsMacUpdate() [all...] |
H A D | napi_cipher.cpp | 317 businessError = GenerateBusinessError(env, context->errCode, context->errMsg); in ReturnCallbackResult() 336 GenerateBusinessError(env, context->errCode, context->errMsg)); in ReturnPromiseResult() 523 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "create context fail!")); in JsCipherInit() 529 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context for init fail!")); in JsCipherInit() 544 napi_throw(env, GenerateBusinessError(env, res, "init cipher fail.")); in SyncInit() 558 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "invalid params count")); in JsCipherInitSync() 565 napi_throw(env, GenerateBusinessError(env, HCF_ERR_NAPI, "unwrap napi napiCipher failed!")); in JsCipherInitSync() 574 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "get napi option mode failed!")); in JsCipherInitSync() 582 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "get napi key failed!")); in JsCipherInitSync() 593 napi_throw(env, GenerateBusinessError(en in JsCipherInitSync() [all...] |
H A D | napi_sign.cpp | 313 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnInitCallbackResult() 332 napi_reject_deferred(env, ctx->deferred, GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnInitPromiseResult() 340 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnUpdateCallbackResult() 359 napi_reject_deferred(env, ctx->deferred, GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnUpdatePromiseResult() 367 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnDoFinalCallbackResult() 386 napi_reject_deferred(env, ctx->deferred, GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnDoFinalPromiseResult() 561 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "create context fail.")); in JsInit() 567 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context fail.")); in JsInit() 585 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "wrong argument num.")); in JsInitSync() 593 napi_throw(env, GenerateBusinessError(en in JsInitSync() [all...] |
H A D | napi_key_agreement.cpp | 169 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnCallbackResult() 189 GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnPromiseResult() 267 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "create context fail.")); in JsGenerateSecret() 273 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context fail.")); in JsGenerateSecret() 318 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "wrong argument num.")); in JsGenerateSecretSync() 326 napi_throw(env, GenerateBusinessError(env, HCF_ERR_NAPI, "failed to unwrap napi verify obj.")); in JsGenerateSecretSync() 334 napi_throw(env, GenerateBusinessError(env, ret, "failed to parse priKey or pubKey.")); in JsGenerateSecretSync() 345 napi_throw(env, GenerateBusinessError(env, ret, "generate secret fail.")); in JsGenerateSecretSync() 354 napi_throw(env, GenerateBusinessError(env, ret, "key agreement convert dataBlob to napi_value failed!")); in JsGenerateSecretSync() 376 napi_throw(env, GenerateBusinessError(en in CreateJsKeyAgreement() [all...] |
H A D | napi_asy_key_generator.cpp | 359 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnGenKeyPairCallbackResult() 379 GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnGenKeyPairPromiseResult() 387 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnConvertKeyCallbackResult() 407 GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnConvertKeyPromiseResult() 417 GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnConvertPemKeyPromiseResult() 440 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "new napi key pair failed!")); in GenKeyPairAsyncWorkReturn() 501 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "new napi key pair failed!")); in ConvertKeyAsyncWorkReturn() 540 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "new napi key pair failed!")); in ConvertPemKeyAsyncWorkReturn() 660 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "malloc ctx fail.")); in JsGenerateKeyPair() 666 napi_throw(env, GenerateBusinessError(en in JsGenerateKeyPair() [all...] |
H A D | napi_verify.cpp | 407 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnInitCallbackResult() 427 GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnInitPromiseResult() 435 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnUpdateCallbackResult() 455 GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnUpdatePromiseResult() 463 businessError = GenerateBusinessError(env, ctx->errCode, ctx->errMsg); in ReturnDoFinalCallbackResult() 483 GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnDoFinalPromiseResult() 492 napi_reject_deferred(env, ctx->deferred, GenerateBusinessError(env, ctx->errCode, ctx->errMsg)); in ReturnRecoverPromiseResult() 715 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "create context fail.")); in JsInit() 721 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context fail.")); in JsInit() 738 napi_throw(env, GenerateBusinessError(en in JsInitSync() [all...] |
H A D | napi_kdf.cpp | 101 businessError = GenerateBusinessError(env, context->errCode, context->errMsg);
in ReturnCallbackResult() 120 GenerateBusinessError(env, context->errCode, context->errMsg));
in ReturnPromiseResult() 526 napi_throw(env, GenerateBusinessError(env, HCF_ERR_MALLOC, "malloc context failed"));
in JsKdfGenerateSecret() 532 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "build context fail."));
in JsKdfGenerateSecret() 553 napi_throw(env, GenerateBusinessError(env, HCF_ERR_NAPI, "returnBlob is nullptr!"));
in NewKdfJsGenSecretSyncWork() 569 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "The arguments count is not expected!"));
in JsKdfGenerateSecretSync() 576 napi_throw(env, GenerateBusinessError(env, HCF_ERR_NAPI, "failed to unwrap NapiKdf obj!"));
in JsKdfGenerateSecretSync() 582 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "fail to get kdf obj!"));
in JsKdfGenerateSecretSync() 588 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "get kdf paramsspec failed!"));
in JsKdfGenerateSecretSync() 596 napi_throw(env, GenerateBusinessError(en in JsKdfGenerateSecretSync() [all...] |
/base/account/os_account/interfaces/kits/napi/common/include/ |
H A D | napi_account_error.h | 28 napi_value GenerateBusinessError(napi_env env, int32_t jsErrCode, const std::string &jsErrMsg); 29 napi_value GenerateBusinessError(napi_env env, int32_t nativeErrCode); 30 napi_value GenerateBusinessError(napi_env env, int32_t nativeErrCode, bool throwErr);
|
/base/security/security_guard/frameworks/js/napi/ |
H A D | security_guard_napi.cpp | 142 static napi_value GenerateBusinessError(napi_env env, int32_t code) in GenerateBusinessError() function 145 SGLOGD("GenerateBusinessError code:%{public}d", code); in GenerateBusinessError() 162 static napi_value GenerateBusinessError(napi_env env, int32_t code, const std::string &msg) in GenerateBusinessError() function 165 SGLOGD("GenerateBusinessError code:%{public}d", code); in GenerateBusinessError() 187 napi_throw(env, GenerateBusinessError(env, BAD_PARAM, msg)); in ParseInt64() 193 napi_throw(env, GenerateBusinessError(env, BAD_PARAM, "get key failed.")); in ParseInt64() 201 napi_throw(env, GenerateBusinessError(env, BAD_PARAM, "type of param is not number.")); in ParseInt64() 216 napi_throw(env, GenerateBusinessError(env, BAD_PARAM, msg)); in ParseInt32() 222 napi_throw(env, GenerateBusinessError(env, BAD_PARAM, "get key failed.")); in ParseInt32() 230 napi_throw(env, GenerateBusinessError(en in ParseInt32() [all...] |
/base/account/os_account/interfaces/kits/napi/appaccount/src/ |
H A D | napi_app_account.cpp | 199 napi_throw(env, GenerateBusinessError(env, ERR_JS_PARAMETER_ERROR, context->errMsg)); in CreateAccount() 218 GenerateBusinessError(env, context->errCode), NapiGetNull(env)); in CreateAccount() 230 napi_throw(env, GenerateBusinessError(env, ERR_JS_PARAMETER_ERROR, context->errMsg)); in CreateAccountImplicitly() 310 napi_throw(env, GenerateBusinessError(env, ERR_JS_PARAMETER_ERROR, asyncContext->errMsg)); in RemoveAccountInternal() 325 napi_value err = asyncContext->throwErr ? GenerateBusinessError(env, asyncContext->errCode) : in RemoveAccountInternal() 403 napi_throw(env, GenerateBusinessError(env, ERR_JS_PARAMETER_ERROR, context->errMsg)); in SetAppAccess() 418 GenerateBusinessError(env, context->errCode), NapiGetNull(env)); in SetAppAccess() 442 napi_throw(env, GenerateBusinessError(env, ERR_JS_PARAMETER_ERROR, asyncContext->errMsg)); in CheckDataSyncEnabledInternal() 461 napi_value err = asyncContext->throwErr ? GenerateBusinessError(env, asyncContext->errCode) : in CheckDataSyncEnabledInternal() 490 napi_throw(env, GenerateBusinessError(en in SetCredentialInternal() [all...] |
/base/useriam/face_auth/frameworks/js/napi/src/ |
H A D | face_auth_napi.cpp | 59 napi_value GenerateBusinessError(napi_env env, int32_t result) in GenerateBusinessError() function 122 napi_throw(env, GenerateBusinessError(env, RESULT_CODE_FAIL)); in SetSurfaceId() 131 napi_throw(env, GenerateBusinessError(env, RESULT_CODE_FAIL)); in SetSurfaceId() 143 napi_throw(env, GenerateBusinessError(env, RESULT_CODE_FAIL)); in SetSurfaceId() 149 napi_throw(env, GenerateBusinessError(env, result)); in SetSurfaceId()
|
/base/security/access_token/frameworks/js/napi/accesstoken/src/ |
H A D | napi_atmanager.cpp | 42 napi_value businessError = GenerateBusinessError(env, jsCode, GetErrorMessage(jsCode)); in ReturnPromiseResult() 54 businessError = GenerateBusinessError(env, jsCode, GetErrorMessage(jsCode)); in ReturnCallbackResult() 386 NAPI_CALL_BASE(env, napi_throw(env, GenerateBusinessError(env, in ParseInputVerifyPermissionOrGetFlag() 395 napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), false); in ParseInputVerifyPermissionOrGetFlag() 403 napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), false); in ParseInputVerifyPermissionOrGetFlag() 603 NAPI_CALL(env, napi_throw(env, GenerateBusinessError(env, JS_ERROR_PARAM_INVALID, errMsg))); in VerifyAccessTokenSync() 609 NAPI_CALL(env, napi_throw(env, GenerateBusinessError(env, JS_ERROR_PARAM_INVALID, errMsg))); in VerifyAccessTokenSync() 638 GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, "Parameter is missing.")), false); in ParseInputGrantOrRevokePermission() 647 env, napi_throw(env, GenerateBusinessError(env, JsErrorCode::JS_ERROR_PARAM_ILLEGAL, errMsg)), false); in ParseInputGrantOrRevokePermission() 655 napi_throw(env, GenerateBusinessError(en in ParseInputGrantOrRevokePermission() [all...] |
/base/security/access_token/interfaces/kits/js/napi/common/include/ |
H A D | napi_error.h | 51 napi_value GenerateBusinessError(napi_env env, int32_t errCode, const std::string& errMsg);
|
/base/account/os_account/interfaces/kits/napi/osaccount/src/ |
H A D | napi_os_account_common.cpp | 153 errJs = GenerateBusinessError(env, asyncContext->errCode); in DeactivateOACompletedCB() 180 errJs = GenerateBusinessError(env, asyncContext->errCode, asyncContext->throwErr); in QueryOAByIdCallbackCompletedCB() 344 errJs = GenerateBusinessError(env, asyncContext->errCode, asyncContext->throwErr); in RemoveOACallbackCompletedCB() 400 errJs = GenerateBusinessError(env, asyncContext->errCode, asyncContext->throwErr); in SetOANameCallbackCompletedCB() 469 errJs = GenerateBusinessError(env, asyncContext->errCode, asyncContext->throwErr); in SetOAConsCallbackCompletedCB() 499 errJs = GenerateBusinessError(env, asyncContext->errCode, asyncContext->throwErr); in ActivateOACallbackCompletedCB() 670 errJs = GenerateBusinessError(env, asyncContext->errCode, asyncContext->throwErr); in CreateOACallbackCompletedCB() 691 errJs = GenerateBusinessError(asyncContext->env, asyncContext->errCode); in CreateOAForDomainCallbackCompletedWork() 723 errJs = GenerateBusinessError(env, asyncContext->errCode, asyncContext->throwErr); in GetOACountCallbackCompletedCB() 765 errJs = GenerateBusinessError(en in DbDeviceIdCallbackCompletedCB() [all...] |