mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-23 15:10:32 +00:00
ConvertString2Int()方法捕获未知错误
Signed-off-by: zhangdd_ewan <zhangdongdong50@huawei.com>
This commit is contained in:
parent
a04bb9542f
commit
f9595a6a80
@ -65,6 +65,10 @@ int32_t ConvertString2Int(const string &numberStr, int32_t& status)
|
||||
status = -1;
|
||||
HiLog::Error(LABEL, "ConvertString2Int: invalid argument out of range");
|
||||
return -1;
|
||||
} catch (...) {
|
||||
status = -1;
|
||||
HiLog::Error(LABEL, "ConvertString2Int: undefined behavior.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user