mirror of
https://gitee.com/openharmony/bundlemanager_app_domain_verify
synced 2024-12-28 03:25:01 +00:00
catch stoll error
Signed-off-by: woohoa <wanghuan36@huawei.com>
This commit is contained in:
parent
f51ae2f2e4
commit
233d6cccf4
@ -143,7 +143,13 @@ bool VerifyTask::HandleFailureClientError(std::string verifyTime, int verifyCnt)
|
||||
APP_DOMAIN_VERIFY_HILOGD(APP_DOMAIN_VERIFY_MODULE_EXTENSION, "called");
|
||||
if (!verifyTime.empty()) {
|
||||
int64_t currTs = GetSecondsSince1970ToNow();
|
||||
int64_t lastTs = static_cast<int64_t>(std::stoll(verifyTime));
|
||||
int64_t lastTs{};
|
||||
try {
|
||||
lastTs = static_cast<int64_t>(std::stoll(verifyTime));
|
||||
} catch (...) {
|
||||
APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_MODULE_EXTENSION, "get verifyTime error");
|
||||
return false;
|
||||
}
|
||||
int64_t duration = currTs - lastTs;
|
||||
int64_t currRetryDuration = CalcRetryDuration(verifyCnt);
|
||||
if (duration <= currRetryDuration) {
|
||||
|
Loading…
Reference in New Issue
Block a user