From: Ian Jackson Date: Sat, 15 May 2021 19:57:10 +0000 (+0100) Subject: otter: Further improve error printing X-Git-Tag: otter-0.6.0~257 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e87d3b50c9639a8d7fc2536a61d64ff8beba09cf;p=otter.git otter: Further improve error printing Signed-off-by: Ian Jackson --- diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 45480347..ab853d15 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -98,13 +98,12 @@ struct Subcommand ( ); inventory::collect!(Subcommand); -#[derive(Error,Debug,Clone)] +#[derive(Error,Debug,Clone,Display)] struct ArgumentParseError(String); -display_as_debug!(ArgumentParseError); impl From<&anyhow::Error> for ArgumentParseError { fn from(ae: &anyhow::Error) -> ArgumentParseError { - eprintln!("error during argument parsing/startup: {:?}\n", ae); + eprintln!("error during argument parsing/startup: {}\n", ae); exit(EXIT_USAGE); } }