Skip to content

Commit

Permalink
review: add source to boxed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoPittella committed Jan 23, 2025
1 parent 76099b8 commit a1e39d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/miden-cli/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub enum CliError {
code(cli::config_error),
help("Check if the configuration file exists and is well-formed.")
)]
Config(Box<dyn StdError + Send + Sync>, String),
Config(#[source] Box<dyn StdError + Send + Sync>, String),
#[error("export error: {0}")]
#[diagnostic(code(cli::export_error), help("Check the ID."))]
Export(String),
Expand All @@ -45,10 +45,10 @@ pub enum CliError {
MissingFlag(String),
#[error("parse error: {1} with error {0}")]
#[diagnostic(code(cli::parse_error), help("Check the inputs."))]
Parse(Box<dyn StdError + Send + Sync>, String),
Parse(#[source] Box<dyn StdError + Send + Sync>, String),
#[error("transaction error: {1} with error {0}")]
#[diagnostic(code(cli::transaction_error))]
Transaction(Box<dyn StdError + Send + Sync>, String),
Transaction(#[source] Box<dyn StdError + Send + Sync>, String),
}

impl From<CliError> for String {
Expand Down

0 comments on commit a1e39d8

Please sign in to comment.