Skip to content

Commit

Permalink
Improve ServiceError reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Dec 29, 2023
1 parent 7d84f6d commit f652948
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/agama-lib/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,7 +20,7 @@ pub enum ServiceError {
FailedRegistration(String),
#[error("Failed to find these patterns: {0:?}")]
UnknownPatterns(Vec<String>),
#[error("Error: {0}")]
#[error("Could not perform action '{0}'")]
UnsuccessfulAction(String),
}

Expand Down

0 comments on commit f652948

Please sign in to comment.