!361 修复onError回调中抛出两次异常

Merge pull request !361 from 张余/master
This commit is contained in:
openharmony_ci 2024-10-23 03:38:06 +00:00 committed by Gitee
commit 4e56987cbc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 0 additions and 8 deletions

View File

@ -38,7 +38,6 @@ constexpr int32_t PARAM2 = 2;
constexpr int32_t PARAM3 = 3;
constexpr int32_t PARAM_SIZE_TWO = 2;
constexpr int32_t PARAM_SIZE_FOUR = 4;
constexpr int32_t ERROR_STR_LEN = 256;
napi_value CMNapiOpenCertManagerDialog(napi_env env, napi_callback_info info);
napi_value CMNapiOpenInstallCertDialog(napi_env env, napi_callback_info info);

View File

@ -100,13 +100,6 @@ void CmUIExtensionCallback::OnError(const int32_t errorCode, const std::string&
if (SetErrorCode(errorCode)) {
SendMessageBack();
}
char errStr[ERROR_STR_LEN] = { 0 };
if (sprintf_s(errStr, ERROR_STR_LEN, "UIExtensionComponent OnError(), errorCode = %d, name = %s, message = %s",
errorCode, name.c_str(), message.c_str()) < 0) {
CM_LOG_E("copy error str failed");
return;
}
ThrowError(this->reqContext_->env, DIALOG_ERROR_GENERIC, errStr);
}
void CmUIExtensionCallback::OnRemoteReady(const std::shared_ptr<OHOS::Ace::ModalUIExtensionProxy>& uiProxy)