aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/interface/errors.cpp
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
commit31773f157bf8164364649b5f470f52dece0a4317 (patch)
tree33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yt/cpp/mapreduce/interface/errors.cpp
parent2c7938962d8689e175574fc1e817c05049f27905 (diff)
parenteff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff)
downloadydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yt/cpp/mapreduce/interface/errors.cpp')
-rw-r--r--yt/cpp/mapreduce/interface/errors.cpp24
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(