summaryrefslogtreecommitdiff
path: root/src/db/update
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-12-29 12:41:45 +0100
committerMax Kellermann <max@duempel.org>2015-12-29 12:56:26 +0100
commitf3503e00264aaf5adb298c651f101c83d97600ef (patch)
tree2fd740a0bfa69407b60a9f5a6a909b3a81e4fb27 /src/db/update
parent826a654c95c962c88f7eb803b50f6fd51504d273 (diff)
fs/DirectoryReader: use C++ exceptions instead of class Error
Diffstat (limited to 'src/db/update')
-rw-r--r--src/db/update/Walk.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx
index f1f2f9bcc..a374af073 100644
--- a/src/db/update/Walk.cxx
+++ b/src/db/update/Walk.cxx
@@ -218,7 +218,7 @@ void
UpdateWalk::UpdateDirectoryChild(Directory &directory,
const ExcludeList &exclude_list,
const char *name, const StorageFileInfo &info)
-{
+try {
assert(strchr(name, '/') == nullptr);
if (info.IsRegular()) {
@@ -242,6 +242,8 @@ UpdateWalk::UpdateDirectoryChild(Directory &directory,
FormatDebug(update_domain,
"%s is not a directory, archive or music", name);
}
+} catch (const std::exception &e) {
+ LogError(e);
}
/* we don't look at "." / ".." nor files with newlines in their name */
@@ -455,7 +457,7 @@ UpdateWalk::DirectoryMakeUriParentChecked(Directory &root, const char *uri)
inline void
UpdateWalk::UpdateUri(Directory &root, const char *uri)
-{
+try {
Directory *parent = DirectoryMakeUriParentChecked(root, uri);
if (parent == nullptr)
return;
@@ -476,6 +478,8 @@ UpdateWalk::UpdateUri(Directory &root, const char *uri)
ExcludeList exclude_list;
UpdateDirectoryChild(*parent, exclude_list, name, info);
+} catch (const std::exception &e) {
+ LogError(e);
}
bool