summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/error/error.cpp
diff options
context:
space:
mode:
authorpechatnov <[email protected]>2025-04-01 14:51:45 +0300
committerpechatnov <[email protected]>2025-04-01 15:13:05 +0300
commit15459267fcda53b29241b23b6fe98b1134986b53 (patch)
treef570673b9267ebeb207bc336ed0057370542d3b3 /library/cpp/yt/error/error.cpp
parent3abc20a83ce4395d801ed44adf6fcada986ed818 (diff)
YT: Add type name of std::exception to error text in TError constructor
Без этого, исключение о выходе за пределы массива в векторе выглядит так: ``` vector origin (pid 178121, thread library-cpp-yt-) datetime 2025-03-31T14:59:49.069209Z ``` С фиксом: ``` vector origin (pid 178121, thread library-cpp-yt-) datetime 2025-03-31T14:59:49.069209Z exception_type std::out_of_range ``` commit_hash:7382eba16208f6847d581b901a7df4dfa39452b0
Diffstat (limited to 'library/cpp/yt/error/error.cpp')
-rw-r--r--library/cpp/yt/error/error.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/cpp/yt/error/error.cpp b/library/cpp/yt/error/error.cpp
index f097697cd6a..ea71a07feed 100644
--- a/library/cpp/yt/error/error.cpp
+++ b/library/cpp/yt/error/error.cpp
@@ -275,6 +275,7 @@ TError::TErrorOr(const std::exception& ex)
*this = errorEx->Error();
} else {
*this = TError(NYT::EErrorCode::Generic, TRuntimeFormat{ex.what()});
+ *this <<= TErrorAttribute("exception_type", TypeName(ex));
}
YT_VERIFY(!IsOK());
Enrich();