Skip to content

Commit 7c16fe2

Browse files
committed
wrap in try catch
1 parent 855a834 commit 7c16fe2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Common/Exception.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,16 @@ bool Exception::isErrorCodeImportant() const
273273
}
274274

275275
Exception::~Exception()
276+
try
276277
{
277278
if (logged != nullptr && !logged->load(std::memory_order_relaxed) && isErrorCodeImportant() && isLoggingEnabled())
278279
{
279280
LOG_ERROR(getLogger("~Exception"), "{}", getExceptionMessage(*this, /*with_stacktrace=*/ true));
280281
}
281282
}
283+
catch (...)
284+
{
285+
}
282286

283287
static void tryLogCurrentExceptionImpl(Poco::Logger * logger, const std::string & start_of_message, LogsLevel level)
284288
{

0 commit comments

Comments
 (0)