From f652948da29b33635d5326a0a4eaaca433f1d198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 28 Dec 2023 11:20:56 +0000 Subject: [PATCH] Improve ServiceError reporting --- rust/agama-lib/src/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/agama-lib/src/error.rs b/rust/agama-lib/src/error.rs index b1fc9ba579..f01a929837 100644 --- a/rust/agama-lib/src/error.rs +++ b/rust/agama-lib/src/error.rs @@ -6,9 +6,9 @@ use zbus; #[derive(Error, Debug)] pub enum ServiceError { - #[error("D-Bus service error")] + #[error("D-Bus service error: {0}")] DBus(#[from] zbus::Error), - #[error("Could not connect to Agama bus at '{0}'")] + #[error("Could not connect to Agama bus at '{0}': {1}")] DBusConnectionError(String, #[source] zbus::Error), // it's fine to say only "Error" because the original // specific error will be printed too @@ -20,7 +20,7 @@ pub enum ServiceError { FailedRegistration(String), #[error("Failed to find these patterns: {0:?}")] UnknownPatterns(Vec), - #[error("Error: {0}")] + #[error("Could not perform action '{0}'")] UnsuccessfulAction(String), }