From f5099620f163ecbb9847804e2544e895cc763ff9 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Tue, 7 Jun 2022 13:58:56 +0100 Subject: [PATCH] tools: Enable extra detail on error The `agent-ctl` and `trace-forwarder` tools make use of `anyhow::Context` to provide additional call site information on error. However, previously neither tool was using the "alternate debug" format to display the error, meaning full error output was not displayed. Fixes: #4411. Signed-off-by: James O. D. Hunt --- src/tools/agent-ctl/src/main.rs | 2 +- src/tools/trace-forwarder/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/agent-ctl/src/main.rs b/src/tools/agent-ctl/src/main.rs index 61701a6645..93d913ba86 100644 --- a/src/tools/agent-ctl/src/main.rs +++ b/src/tools/agent-ctl/src/main.rs @@ -320,7 +320,7 @@ fn real_main() -> Result<()> { fn main() { if let Err(e) = real_main() { - eprintln!("ERROR: {}", e); + eprintln!("ERROR: {:#?}", e); exit(1); } } diff --git a/src/tools/trace-forwarder/src/main.rs b/src/tools/trace-forwarder/src/main.rs index 12787a29ae..482bbdda80 100644 --- a/src/tools/trace-forwarder/src/main.rs +++ b/src/tools/trace-forwarder/src/main.rs @@ -282,7 +282,7 @@ fn real_main() -> Result<()> { fn main() { if let Err(e) = real_main() { - eprintln!("ERROR: {}", e); + eprintln!("ERROR: {:#?}", e); exit(1); } exit(0);