Problem
StringUtilities::ToInt and ToDouble (src/string_utilities.cc) wrap std::stoll / std::stod in a catch (...) that returns 0 / 0.0:
int64_t StringUtilities::ToInt(const std::wstring& s) {
try { return std::stoll(s); } catch (...) { return 0; }
}
Impact
Any malformed or out-of-range numeric string is silently converted to 0 with no error. std::stoll/std::stod throw std::out_of_range for values that don't fit, so e.g. a legitimately huge integer becomes 0 rather than failing. This is silent data corruption on the fetch path, and it masks the integer-truncation issue as well.
Suggested direction
Surface the failure instead of swallowing it — throw, or return a status/std::optional the caller must handle. At minimum, distinguish "parsed 0" from "failed to parse".
Problem
StringUtilities::ToIntandToDouble(src/string_utilities.cc) wrapstd::stoll/std::stodin acatch (...)that returns0/0.0:Impact
Any malformed or out-of-range numeric string is silently converted to
0with no error.std::stoll/std::stodthrowstd::out_of_rangefor values that don't fit, so e.g. a legitimately huge integer becomes0rather than failing. This is silent data corruption on the fetch path, and it masks the integer-truncation issue as well.Suggested direction
Surface the failure instead of swallowing it — throw, or return a status/
std::optionalthe caller must handle. At minimum, distinguish "parsed 0" from "failed to parse".