summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/string/enum.h
diff options
context:
space:
mode:
authorpechatnov <[email protected]>2026-03-26 10:11:59 +0300
committerpechatnov <[email protected]>2026-03-26 11:00:16 +0300
commit9852998440dcaa3eec11377553e996ff9852bb4e (patch)
tree83fd6cf6a491aba90ce28060576fdbf736939227 /library/cpp/yt/string/enum.h
parent46c6fa262d8246e71e7f5ed33eb8458f45c5ddf7 (diff)
Add suggestions on enum parse error
commit_hash:3b7f35f613737aa92f473877e8b24782f7dfcd2a
Diffstat (limited to 'library/cpp/yt/string/enum.h')
-rw-r--r--library/cpp/yt/string/enum.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/cpp/yt/string/enum.h b/library/cpp/yt/string/enum.h
index de7d6a52fac..322485a560d 100644
--- a/library/cpp/yt/string/enum.h
+++ b/library/cpp/yt/string/enum.h
@@ -17,6 +17,9 @@ std::string EncodeEnumValue(TStringBuf value);
template <class T>
std::optional<T> TryParseEnum(TStringBuf str, bool enableUnknown = false);
+//! Parses an enum value from a string.
+//! Link against library/cpp/yt/string/enable_enum_suggestions_on_enum_parse_error
+//! to include suggestions in the exception message on parse failure.
template <class T>
T ParseEnum(TStringBuf str);