diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2018-02-22 21:55:01 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2018-02-22 21:55:01 +0100 |
commit | 3eff00692463b12dce7e9d923e7bd8ccda1fac2f (patch) | |
tree | d73a8d08be94b146188e8b1a2cd0e1ef0e3b8285 /src/library/library.cpp | |
parent | 4a5d7704eedb77843bb3b994b071b69133135472 (diff) |
Don't throw any exceptions during the deletion of track objects
Diffstat (limited to 'src/library/library.cpp')
-rw-r--r-- | src/library/library.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/library/library.cpp b/src/library/library.cpp index bcd340cce7..a82564f34d 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -422,7 +422,7 @@ void Library::slotSetTrackTableRowHeight(int rowHeight) { emit(setTrackTableRowHeight(rowHeight)); } -void Library::deleteCachedTrack(Track* pTrack) { +void Library::deleteCachedTrack(Track* pTrack) throw() { // It can produce dangerous signal loops if the track is still // sending signals while being saved! All references to this // track have been dropped at this point, so there is no need @@ -437,7 +437,12 @@ void Library::deleteCachedTrack(Track* pTrack) { // ensure that we have exclusive (write) access on the file // and not reader or writer is accessing the same file // concurrently. - m_pTrackCollection->exportTrackMetadata(pTrack); + try { + m_pTrackCollection->exportTrackMetadata(pTrack); + } catch (...) { + kLogger.warning() + << "Failed to export track metadata before deletion"; + } // NOTE(uklotzde, 2018-02-20): // Database updates must be executed in the context of the |