diff options
author | Maxim Yurchuk <maxim-yurchuk@ydb.tech> | 2024-11-20 17:37:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 17:37:57 +0000 |
commit | f76323e9b295c15751e51e3443aa47a36bee8023 (patch) | |
tree | 4113c8cad473a33e0f746966e0cf087252fa1d7a /yt/cpp/mapreduce/interface/errors.cpp | |
parent | 753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff) | |
parent | a7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff) | |
download | ydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz |
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 241120-1113
Diffstat (limited to 'yt/cpp/mapreduce/interface/errors.cpp')
-rw-r--r-- | yt/cpp/mapreduce/interface/errors.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/yt/cpp/mapreduce/interface/errors.cpp b/yt/cpp/mapreduce/interface/errors.cpp index ef3d2db4a3..0819c8ca56 100644 --- a/yt/cpp/mapreduce/interface/errors.cpp +++ b/yt/cpp/mapreduce/interface/errors.cpp @@ -20,20 +20,11 @@ using namespace NJson; static void WriteErrorDescription(const TYtError& error, IOutputStream* out) { - (*out) << '\'' << error.GetMessage() << '\''; + (*out) << error.GetMessage(); const auto& innerErrorList = error.InnerErrors(); if (!innerErrorList.empty()) { - (*out) << " { "; - bool first = true; - for (const auto& innerError : innerErrorList) { - if (first) { - first = false; - } else { - (*out) << " ; "; - } - WriteErrorDescription(innerError, out); - } - (*out) << " }"; + (*out) << ": "; + WriteErrorDescription(innerErrorList[0], out); } } @@ -118,9 +109,11 @@ TYtError::TYtError(const TString& message) , Message_(message) { } -TYtError::TYtError(int code, const TString& message) +TYtError::TYtError(int code, TString message, TVector<TYtError> innerError, TNode::TMapType attributes) : Code_(code) , Message_(message) + , InnerErrors_(innerError) + , Attributes_(attributes) { } TYtError::TYtError(const TJsonValue& value) @@ -396,6 +389,11 @@ void TErrorResponse::Setup() *this << Error_.FullDescription(); } +TTransportError::TTransportError(TYtError error) +{ + *this << error.FullDescription(); +} + //////////////////////////////////////////////////////////////////////////////// TOperationFailedError::TOperationFailedError( |