/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() argument 82 NAPI_CALL(env, napi_create_uint32(env, jsErrCode, &errCodeJs)); in GenerateBusinessError() 94 std::string ConvertToJsErrMsg(int32_t jsErrCode) in ConvertToJsErrMsg() argument 96 auto iter = g_errorStringMap.find(jsErrCode); in ConvertToJsErrMsg() 134 int32_t jsErrCode = nativeErrCode; in GenerateBusinessError() local 135 auto iter = g_errorStringMap.find(jsErrCode); in GenerateBusinessError() 137 jsErrCode = ConvertToJSErrCode(nativeErrCode); in GenerateBusinessError() 139 std::string jsErrMsg = ConvertToJsErrMsg(jsErrCode); in GenerateBusinessError() 141 return GenerateBusinessError(env, jsErrCode, jsErrMsg); in GenerateBusinessError() 160 void AccountNapiThrow(napi_env env, int32_t jsErrCode, cons argument 167 AccountIAMNapiThrow(napi_env env, int32_t jsErrCode, bool throwErr) AccountIAMNapiThrow() argument [all...] |
/base/account/os_account/interfaces/kits/napi/common/include/ |
H A D | napi_account_error.h | 26 std::string ConvertToJsErrMsg(int32_t jsErrCode); 28 napi_value GenerateBusinessError(napi_env env, int32_t jsErrCode, const std::string &jsErrMsg); 31 void AccountNapiThrow(napi_env env, int32_t jsErrCode, const std::string &jsErrMsg, bool throwErr = true); 33 void AccountIAMNapiThrow(napi_env env, int32_t jsErrCode, bool throwErr);
|
/base/security/dlp_permission_service/interfaces/kits/napi_common/src/ |
H A D | napi_error_msg.cpp | 161 std::string GetJsErrMsg(int32_t jsErrCode) in GetJsErrMsg() argument 163 auto iter = JS_ERROR_MSG_MAP.find(jsErrCode); in GetJsErrMsg() 167 std::string msg = "unkown error, please reboot your device and try again, error=" + std::to_string(jsErrCode); in GetJsErrMsg()
|
H A D | napi_common.cpp | 386 napi_value GenerateBusinessError(napi_env env, int32_t jsErrCode, const std::string &jsErrMsg) in GenerateBusinessError() argument 389 NAPI_CALL(env, napi_create_uint32(env, jsErrCode, &errCodeJs)); in GenerateBusinessError() 403 int32_t jsErrCode = NativeCodeToJsCode(nativeErrCode); in DlpNapiThrow() local 404 NAPI_CALL_RETURN_VOID(env, napi_throw(env, GenerateBusinessError(env, jsErrCode, GetJsErrMsg(jsErrCode)))); in DlpNapiThrow() 407 void DlpNapiThrow(napi_env env, int32_t jsErrCode, const std::string &jsErrMsg) in DlpNapiThrow() argument 409 NAPI_CALL_RETURN_VOID(env, napi_throw(env, GenerateBusinessError(env, jsErrCode, jsErrMsg))); in DlpNapiThrow() 561 int32_t jsErrCode = NativeCodeToJsCode(asyncContext->errCode); in ProcessCallbackOrPromise() local 562 napi_value errObj = GenerateBusinessError(env, jsErrCode, GetJsErrMsg(jsErrCode)); in ProcessCallbackOrPromise() [all...] |
/base/account/os_account/interfaces/kits/napi/account_iam/src/ |
H A D | napi_account_iam_common.cpp | 424 int32_t jsErrCode = AccountIAMConvertToJSErrCode(prop.result); in CreateExecutorProperty() local 425 errJs = GenerateBusinessError(env, jsErrCode, ConvertToJsErrMsg(jsErrCode)); in CreateExecutorProperty() 589 int32_t jsErrCode = AccountIAMConvertToJSErrCode(context->errCode); in OnGetInfoWork() local 590 errJs = GenerateBusinessError(env, jsErrCode, ConvertToJsErrMsg(jsErrCode)); in OnGetInfoWork() 647 int32_t jsErrCode = AccountIAMConvertToJSErrCode(context->errCode); in OnGetEnrolledIdWork() local 648 errJs = GenerateBusinessError(env, jsErrCode, ConvertToJsErrMsg(jsErrCode)); in OnGetEnrolledIdWork() 839 int32_t jsErrCode in OnPrepareRemoteAuthWork() local 894 int32_t jsErrCode = AccountIAMConvertToJSErrCode(context->result); OnSetPropertyWork() local [all...] |
H A D | napi_account_iam_identity_manager.cpp | 123 int32_t jsErrCode = AccountIAMConvertToJSErrCode(context->errCode); in OpenSession() 124 errJs = GenerateBusinessError(env, jsErrCode, ConvertToJsErrMsg(jsErrCode)); in OpenSession()
|
/base/security/dlp_permission_service/interfaces/kits/napi_common/include/ |
H A D | napi_common.h | 283 void DlpNapiThrow(napi_env env, int32_t jsErrCode, const std::string &jsErrMsg); 284 napi_value GenerateBusinessError(napi_env env, int32_t jsErrCode, const std::string &jsErrMsg);
|
/base/security/dlp_permission_service/interfaces/kits/dlp_permission/napi/src/ |
H A D | napi_dlp_permission.cpp | 60 int32_t jsErrCode = ERR_JS_PERMISSION_DENIED; in CheckPermission() local 61 NAPI_CALL_BASE(env, napi_throw(env, GenerateBusinessError(env, jsErrCode, GetJsErrMsg(jsErrCode))), false); in CheckPermission() 1841 int32_t jsErrCode = ERR_JS_NOT_SYSTEM_APP; in IsSystemApp() local 1842 NAPI_CALL_BASE(env, napi_throw(env, GenerateBusinessError(env, jsErrCode, GetJsErrMsg(jsErrCode))), false); in IsSystemApp()
|
/base/security/security_guard/frameworks/js/napi/ |
H A D | security_guard_napi.cpp | 149 int32_t jsErrCode = ConvertToJsErrCode(code); in GenerateBusinessError() local 150 napi_value errCode = NapiCreateInt32(env, jsErrCode); in GenerateBusinessError() 169 int32_t jsErrCode = ConvertToJsErrCode(code); in GenerateBusinessError() local 170 napi_value errCode = NapiCreateInt32(env, jsErrCode); in GenerateBusinessError()
|