diff --git a/src/Interpreters/TraceCollector.cpp b/src/Interpreters/TraceCollector.cpp index 050dea02717..40a5b1f228d 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