summaryrefslogtreecommitdiff
path: root/src/SongUpdate.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-09-16 17:05:28 +0200
committerMax Kellermann <max@musicpd.org>2016-09-16 17:43:32 +0200
commit100308db020dfe901e784d3ebacbda4db89c8a40 (patch)
tree7f2097016a61236876688362ff70775f8972912f /src/SongUpdate.cxx
parentab967462e6aa2e2b3859e195943c61dc694f34ac (diff)
db/update: catch exceptions from Storage plugins
Diffstat (limited to 'src/SongUpdate.cxx')
-rw-r--r--src/SongUpdate.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx
index f8686f161..78741dc3e 100644
--- a/src/SongUpdate.cxx
+++ b/src/SongUpdate.cxx
@@ -35,6 +35,8 @@
#include "TagArchive.hxx"
#endif
+#include <stdexcept>
+
#include <assert.h>
#include <string.h>
@@ -65,8 +67,13 @@ Song::UpdateFile(Storage &storage)
const auto &relative_uri = GetURI();
StorageFileInfo info;
- if (!storage.GetInfo(relative_uri.c_str(), true, info, IgnoreError()))
+ try {
+ if (!storage.GetInfo(relative_uri.c_str(), true, info,
+ IgnoreError()))
+ return false;
+ } catch (const std::runtime_error &) {
return false;
+ }
if (!info.IsRegular())
return false;