summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/error/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'library/cpp/yt/error/error.h')
-rw-r--r--library/cpp/yt/error/error.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/library/cpp/yt/error/error.h b/library/cpp/yt/error/error.h
index b2d0abacfe8..1e5c2147d82 100644
--- a/library/cpp/yt/error/error.h
+++ b/library/cpp/yt/error/error.h
@@ -253,9 +253,6 @@ private:
void EnrichFromException(const std::exception& exception);
friend class TErrorAttributes;
-
- static TEnricher Enricher_;
- static TFromExceptionEnricher FromExceptionEnricher_;
};
////////////////////////////////////////////////////////////////////////////////
@@ -478,10 +475,15 @@ void FormatValue(TStringBuilderBase* builder, const TErrorOr<T>& error, TStringB
////////////////////////////////////////////////////////////////////////////////
template <class F, class... As>
-auto RunNoExcept(F&& functor, As&&... args) noexcept -> decltype(functor(std::forward<As>(args)...))
-{
- return functor(std::forward<As>(args)...);
-}
+auto RunNoExcept(F&& functor, As&&... args) noexcept -> decltype(functor(std::forward<As>(args)...));
+
+////////////////////////////////////////////////////////////////////////////////
+
+//! Registers errors as a well-known logging tag (ADL customization point for
+//! library/cpp/yt/logging), so that |YT_TLOG_*(...).With(error)| attaches them under
+//! the "Error" key, rendered after the message in plain text.
+TStringBuf GetWellKnownLoggingTag(const std::exception&);
+TStringBuf GetWellKnownLoggingTag(const TError&);
////////////////////////////////////////////////////////////////////////////////