diff options
Diffstat (limited to 'library/cpp/yt/error/error.cpp')
| -rw-r--r-- | library/cpp/yt/error/error.cpp | 2 |
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)); |
