]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- handle DBus connection error in snapper-zypp-plugin 1063/head
authorArvin Schnell <aschnell@suse.de>
Tue, 21 Oct 2025 10:58:56 +0000 (12:58 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 21 Oct 2025 10:58:56 +0000 (12:58 +0200)
package/snapper.changes
zypp-plugin/snapper-zypp-plugin.cc

index 33aa71f369a0f40103fed1c6657132cc560b3d39..346a81913f8762b0ab45756b38a74b23f9ca33d0 100644 (file)
@@ -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
 
index b9c3ee2d23a56d36439392a832d4f273e9ce1210..ead638eb6d4cb9e0e1bca3a1b5544cdd7ff6d724 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2019-2024] SUSE LLC
+ * Copyright (c) [2019-2025] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -20,7 +20,7 @@
  */
 
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <sys/types.h>
 #include <unistd.h>
 
@@ -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;
+    }
 }