From 47a8704130b3d47dcb4eb806c3eae41292e90eb4 Mon Sep 17 00:00:00 2001 From: arkady-e1ppa Date: Wed, 25 Dec 2024 10:19:49 +0300 Subject: YT-21233: Issues and tidying up of rXXXXXX commit_hash:19481c9fbb008aab4f4d676f1a3a242f6e90e90e --- library/cpp/yt/error/error.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'library/cpp/yt/error/error.cpp') diff --git a/library/cpp/yt/error/error.cpp b/library/cpp/yt/error/error.cpp index bcc265ab2ed..59eea6ce8c6 100644 --- a/library/cpp/yt/error/error.cpp +++ b/library/cpp/yt/error/error.cpp @@ -435,7 +435,7 @@ bool TError::HasAttributes() const noexcept const TErrorAttributes& TError::Attributes() const { if (!Impl_) { - static TErrorAttributes empty = {}; + static TErrorAttributes empty; return empty; } return Impl_->Attributes(); @@ -688,6 +688,12 @@ TError& TError::operator <<= (std::vector&& innerErrors) & return *this; } +TError& TError::operator <<= (TAnyMergeableDictionaryRef attributes) & +{ + MutableAttributes()->MergeFrom(attributes); + return *this; +} + //////////////////////////////////////////////////////////////////////////////// bool operator == (const TError& lhs, const TError& rhs) -- cgit v1.3