diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2018-02-23 00:02:58 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2018-02-23 00:48:34 +0100 |
commit | b6e2f63ec5b6471173ce68c8fde48043c1528c23 (patch) | |
tree | e132e73c3a0c9a67374405839eafd9db3e8756e6 /src/library/library.cpp | |
parent | 95c8fcb8bb7fa813c833a518b902104bc2de457c (diff) |
Delete confusing try/catch block in noexcept function
Diffstat (limited to 'src/library/library.cpp')
-rw-r--r-- | src/library/library.cpp | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/library/library.cpp b/src/library/library.cpp index 6ae2853533..8cdd1a02ed 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -437,12 +437,7 @@ void Library::deleteCachedTrack(Track* pTrack) noexcept { // ensure that we have exclusive (write) access on the file // and not reader or writer is accessing the same file // concurrently. - try { - m_pTrackCollection->exportTrackMetadata(pTrack); - } catch (...) { - kLogger.warning() - << "Failed to export track metadata before deletion"; - } + m_pTrackCollection->exportTrackMetadata(pTrack); // NOTE(uklotzde, 2018-02-20): // Database updates must be executed in the context of the @@ -459,19 +454,14 @@ void Library::deleteCachedTrack(Track* pTrack) noexcept { // This method might be invoked from a different thread than // the main thread. But database updates are currently only // allowed from the main thread! - try { - QMetaObject::invokeMethod( - this, - "saveAndDeleteTrack", - // Qt will choose either a direct or a queued connection - // depending on the thread from which this method has - // been invoked! - Qt::AutoConnection, - Q_ARG(Track*, pTrack)); - } catch (...) { - kLogger.warning() - << "Failed to update track in database before deletion"; - } + QMetaObject::invokeMethod( + this, + "saveAndDeleteTrack", + // Qt will choose either a direct or a queued connection + // depending on the thread from which this method has + // been invoked! + Qt::AutoConnection, + Q_ARG(Track*, pTrack)); } void Library::saveAndDeleteTrack(Track* pTrack) { |