diff --git a/frameworks/intl/src/utils.cpp b/frameworks/intl/src/utils.cpp index b90a12e9..b3a9787c 100644 --- a/frameworks/intl/src/utils.cpp +++ b/frameworks/intl/src/utils.cpp @@ -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; } }