From: Arvin Schnell Date: Tue, 21 Oct 2025 10:58:56 +0000 (+0200) Subject: - handle DBus connection error in snapper-zypp-plugin X-Git-Tag: v0.13.1~76^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1063%2Fhead;p=thirdparty%2Fsnapper.git - handle DBus connection error in snapper-zypp-plugin --- diff --git a/package/snapper.changes b/package/snapper.changes index 33aa71f3..346a8191 100644 --- a/package/snapper.changes +++ b/package/snapper.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 21 12:57:50 CEST 2025 - aschnell@suse.com + +- handle DBus connection error in snapper-zypp-plugin + ------------------------------------------------------------------- Mon Oct 13 08:43:43 CEST 2025 - aschnell@suse.com diff --git a/zypp-plugin/snapper-zypp-plugin.cc b/zypp-plugin/snapper-zypp-plugin.cc index b9c3ee2d..ead638eb 100644 --- a/zypp-plugin/snapper-zypp-plugin.cc +++ b/zypp-plugin/snapper-zypp-plugin.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) [2019-2024] SUSE LLC + * Copyright (c) [2019-2025] SUSE LLC * * All Rights Reserved. * @@ -20,7 +20,7 @@ */ -#include +#include #include #include @@ -451,6 +451,16 @@ main() } ProgramOptions options; - SnapperZyppCommitPlugin plugin(options); - return plugin.main(); + + try + { + SnapperZyppCommitPlugin plugin(options); + return plugin.main(); + } + catch (const DBus::ErrorException& e) + { + SN_CAUGHT(e); + y2err("failure (" << e.message() << ")"); + return EXIT_FAILURE; + } }