summaryrefslogtreecommitdiff
path: root/src/Instance.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-10-27 07:50:08 +0200
committerMax Kellermann <max@musicpd.org>2016-10-27 07:50:08 +0200
commit10e32454ef161563a1bde2a8b35306bcce419a0c (patch)
tree22f52e24ad5caf2e6f71f3e3e86136d91ec3f442 /src/Instance.cxx
parent8d41e9658fc57eabc8978a9100bdaa8c7a9c5aa9 (diff)
lib/sqlite, sticker: migrate from class Error to C++ exceptions
Diffstat (limited to 'src/Instance.cxx')
-rw-r--r--src/Instance.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Instance.cxx b/src/Instance.cxx
index a989b1f5d..5aed5bc91 100644
--- a/src/Instance.cxx
+++ b/src/Instance.cxx
@@ -22,7 +22,6 @@
#include "Partition.hxx"
#include "Idle.hxx"
#include "Stats.hxx"
-#include "util/Error.hxx"
#ifdef ENABLE_DATABASE
#include "db/DatabaseError.hxx"
@@ -33,6 +32,8 @@
#endif
#endif
+#include <stdexcept>
+
#ifdef ENABLE_DATABASE
const Database &
@@ -63,8 +64,12 @@ Instance::OnDatabaseSongRemoved(const char *uri)
#ifdef ENABLE_SQLITE
/* if the song has a sticker, remove it */
- if (sticker_enabled())
- sticker_song_delete(uri, IgnoreError());
+ if (sticker_enabled()) {
+ try {
+ sticker_song_delete(uri);
+ } catch (const std::runtime_error &) {
+ }
+ }
#endif
partition->StaleSong(uri);