From 9852998440dcaa3eec11377553e996ff9852bb4e Mon Sep 17 00:00:00 2001 From: pechatnov Date: Thu, 26 Mar 2026 10:11:59 +0300 Subject: Add suggestions on enum parse error commit_hash:3b7f35f613737aa92f473877e8b24782f7dfcd2a --- library/cpp/yt/string/enum.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'library/cpp/yt/string/enum.h') 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 std::optional 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 T ParseEnum(TStringBuf str); -- cgit v1.3