aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakhropov <akhropov@yandex-team.com>2024-11-19 21:06:34 +0300
committerakhropov <akhropov@yandex-team.com>2024-11-19 21:56:29 +0300
commit7adbae591523da629a126b139a0673bedd6411c1 (patch)
treefa16f28dfa5a9d59af30cf1e9abd2b29bea39a6c
parent321925491e7ee4c1fddd0294839f35d2104d637d (diff)
downloadydb-7adbae591523da629a126b139a0673bedd6411c1.tar.gz
Add a clarifying comment about exceptions in TryFromString* functions
commit_hash:60b664d99f74a0d1ec00e0ab843e87583a5360a4
-rw-r--r--util/string/cast.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/string/cast.h b/util/string/cast.h
index da99a02f92..65c92f9a4b 100644
--- a/util/string/cast.h
+++ b/util/string/cast.h
@@ -217,6 +217,7 @@ inline ::NPrivate::TFromString<typename T::TChar> FromString(const T& s) {
}
// Conversion exception free versions
+// But can throw other exceptions, e.g. std::bad_alloc when allocating memory for the new 'result' value.
template <typename T, typename TChar>
bool TryFromStringImpl(const TChar* data, size_t len, T& result);