From 72f071b2b9af1f38cc4a903c28c056ee1ec5bc5e Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 30 Dec 2022 16:13:02 +0000 Subject: [PATCH] Do not throw exceptions in ~TraceCollector. --- src/Interpreters/TraceCollector.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Interpreters/TraceCollector.cpp b/src/Interpreters/TraceCollector.cpp index 367249f1289..33e72a038b7 100644 --- a/src/Interpreters/TraceCollector.cpp +++ b/src/Interpreters/TraceCollector.cpp @@ -31,6 +31,7 @@ TraceCollector::TraceCollector(std::shared_ptr trace_log_) TraceCollector::~TraceCollector() +try { if (!thread.joinable()) LOG_ERROR(&Poco::Logger::get("TraceCollector"), "TraceCollector thread is malformed and cannot be joined"); @@ -39,6 +40,10 @@ TraceCollector::~TraceCollector() TraceSender::pipe.close(); } +catch (...) +{ + tryLogCurrentException("TraceCollector"); +} /** Sends TraceCollector stop message