From e3eff819ec487e3661c1513b49ef3de844d364e9 Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 11 Feb 2021 16:54:18 +0100 Subject: [PATCH] Avoid catchinng all exceptions without re-throwing them This shouldn't be required and leads to problems when `pthread_cancel` would be used: https://udrepper.livejournal.com/21541.html Note that the tagparser library itself does not contain any `catch (...)` blocks (which do not re-throw). --- gui/tageditorwidget.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gui/tageditorwidget.cpp b/gui/tageditorwidget.cpp index 8a298fc..bd520d4 100644 --- a/gui/tageditorwidget.cpp +++ b/gui/tageditorwidget.cpp @@ -862,9 +862,6 @@ bool TagEditorWidget::startParsing(const QString &path, bool forceRefresh) } catch (const std::exception &e) { diag.emplace_back(TagParser::DiagLevel::Critical, argsToString("Something completely unexpected happened: ", +e.what()), "parsing"); result = FatalParsingError; - } catch (...) { - diag.emplace_back(TagParser::DiagLevel::Critical, "Something completely unexpected happened", "parsing"); - result = FatalParsingError; } QMetaObject::invokeMethod(this, "showFile", Qt::QueuedConnection, Q_ARG(char, result)); }; @@ -1192,9 +1189,6 @@ bool TagEditorWidget::startSaving() } catch (const exception &e) { m_diag.emplace_back(TagParser::DiagLevel::Critical, argsToString("Something completely unexpected happened: ", e.what()), "making"); processingError = true; - } catch (...) { - m_diag.emplace_back(TagParser::DiagLevel::Critical, "Something completely unexpected happened", "making"); - processingError = true; } QMetaObject::invokeMethod( this, "showSavingResult", Qt::QueuedConnection, Q_ARG(bool, processingError), Q_ARG(bool, ioError), Q_ARG(bool, canceled));