From d3cc54d4eb123712dffc033256569dd3e03a78a9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 1 Sep 2019 12:57:24 +0200 Subject: [PATCH] TagArchive, db/update/Service: catch all exceptions --- src/TagArchive.cxx | 4 ++-- src/db/update/Service.cxx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/TagArchive.cxx b/src/TagArchive.cxx index 08afbfebd..b038d03eb 100644 --- a/src/TagArchive.cxx +++ b/src/TagArchive.cxx @@ -33,7 +33,7 @@ try { return false; return tag_stream_scan(*is, handler); -} catch (const std::exception &e) { +} catch (...) { return false; } @@ -45,6 +45,6 @@ try { auto is = archive.OpenStream(path_utf8, mutex); return is && tag_stream_scan(*is, builder); -} catch (const std::exception &e) { +} catch (...) { return false; } diff --git a/src/db/update/Service.cxx b/src/db/update/Service.cxx index 1f9f17b4a..70528186d 100644 --- a/src/db/update/Service.cxx +++ b/src/db/update/Service.cxx @@ -126,8 +126,9 @@ UpdateService::Task() noexcept if (modified || !next.db->FileExists()) { try { next.db->Save(); - } catch (const std::exception &e) { - LogError(e, "Failed to save database"); + } catch (...) { + LogError(std::current_exception(), + "Failed to save database"); } }