Lines Matching defs:errCode
70 SetCallback(env, info.callback, info.errCode, result);
77 const napi_env& env, const napi_ref& callbackIn, const int32_t& errCode, const napi_value& result)
86 if (errCode == ERR_OK) {
89 int32_t errCodeInfo = FindErrCode(env, errCode);
90 std::string errMsg = FindErrMsg(env, errCode);
101 if (info.errCode == ERR_OK) {
104 int32_t errCodeInfo = FindErrCode(env, info.errCode);
105 std::string errMsg = FindErrMsg(env, info.errCode);
121 napi_value Common::GetCallbackErrorValue(napi_env env, const int32_t errCode, const std::string errMsg)
123 if (errCode == ERR_OK) {
129 NAPI_CALL(env, napi_create_int32(env, errCode, &eCode));
138 void Common::HandleErrCode(const napi_env &env, int32_t errCode)
140 STANDBYSERVICE_LOGI("HandleErrCode errCode = %{public}d", errCode);
141 if (errCode == ERR_OK) {
144 std::string errMsg = FindErrMsg(env, errCode);
145 int32_t errCodeInfo = FindErrCode(env, errCode);
151 std::string Common::FindErrMsg(const napi_env& env, const int32_t errCode)
153 if (errCode == ERR_OK) {
156 auto iter = saErrCodeMsgMap.find(errCode);
159 int32_t errCodeInfo = FindErrCode(env, errCode);
163 iter = paramErrCodeMsgMap.find(errCode);
166 errMessage.append(paramErrCodeMsgMap[errCode]);
181 bool Common::HandleParamErr(const napi_env& env, int32_t errCode)
183 STANDBYSERVICE_LOGI("HandleParamErr errCode = %{public}d, isThrow = true", errCode);
184 if (errCode == ERR_OK) {
187 auto iter = paramErrCodeMsgMap.find(errCode);
190 errMessage.append(paramErrCodeMsgMap[errCode]);