summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt
diff options
context:
space:
mode:
authordann239 <[email protected]>2026-05-25 10:58:24 +0300
committerdann239 <[email protected]>2026-05-25 11:19:52 +0300
commitb98aa1ad6a725444af35a0070e6dea6f2114f8d3 (patch)
tree614f5ef7770efa4bf2db630fe8c3342f63165237 /library/cpp/yt
parent0596ab66dcfc97ebbd946933121b2cdd7038b45c (diff)
YT-26105: Make TError aware of ::TSystemError
commit_hash:ca6efe06865fe9fc9ebfd5ca8bbd79c2acbb4ff3
Diffstat (limited to 'library/cpp/yt')
-rw-r--r--library/cpp/yt/error/error.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/cpp/yt/error/error.cpp b/library/cpp/yt/error/error.cpp
index fa1cae1c839..d0a5489ab22 100644
--- a/library/cpp/yt/error/error.cpp
+++ b/library/cpp/yt/error/error.cpp
@@ -273,6 +273,8 @@ TError::TErrorOr(const std::exception& ex)
}
} else if (const auto* errorEx = dynamic_cast<const TErrorException*>(&ex)) {
*this = errorEx->Error();
+ } else if (const auto* sysError = dynamic_cast<const ::TSystemError*>(&ex)) {
+ *this = TError::FromSystem(*sysError);
} else {
*this = TError(NYT::EErrorCode::Generic, TRuntimeFormat{ex.what()});
*this <<= TErrorAttribute("exception_type", TypeName(ex));