From a104beff6f79885196ea03f375d3f72b49524da3 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 7 Jan 2021 16:19:56 +0100 Subject: [PATCH] HTML/RSS: Log if repo couldn't be updated. --- src/generators/html.cpp | 5 +++-- src/generators/rss.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/generators/html.cpp b/src/generators/html.cpp index 089faac..4bbfd80 100644 --- a/src/generators/html.cpp +++ b/src/generators/html.cpp @@ -1,5 +1,5 @@ /* This file is part of FediBlock-backend. - * Copyright © 2020 tastytea + * Copyright © 2020, 2021 tastytea * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -197,8 +197,9 @@ int main(int argc, char *argv[]) git::update_cached_repo(); remove_lockfile = true; } - catch (const runtime_error &) + catch (const runtime_error &e) { + cerr << "Warning: " << e.what() << '\n'; // Ignore, use old version of repo. } const auto entries{files::read_json_files(true)}; diff --git a/src/generators/rss.cpp b/src/generators/rss.cpp index 26c915a..99ad35b 100644 --- a/src/generators/rss.cpp +++ b/src/generators/rss.cpp @@ -1,5 +1,5 @@ /* This file is part of FediBlock-backend. - * Copyright © 2020 tastytea + * Copyright © 2020, 2021 tastytea * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -216,8 +216,9 @@ int main(int /*argc*/, char * /*argv*/[]) git::update_cached_repo(); remove_lockfile = true; } - catch (const runtime_error &) + catch (const runtime_error &e) { + cerr << "Warning: " << e.what() << '\n'; // Ignore, use old version of repo. } const auto entries{files::read_json_files(true)};