From aee6eb2261d85a7b5d048aad84bf44ae14539176 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Thu, 17 Sep 2020 09:39:14 +0200 Subject: [PATCH] {:#} once more --- src/sql.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sql.rs b/src/sql.rs index 89e281bcb..81e4a9807 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -93,7 +93,14 @@ impl Sql { } } } - res.map_err(|e| format_err!("Could not open db file {}: {}", dbfile.as_ref().to_string_lossy(), e)) + res.map_err(|e| { + format_err!( + // We are using Anyhow's .context() and to show the inner error, too, we need the {:#}: + "Could not open db file {}: {:#}", + dbfile.as_ref().to_string_lossy(), + e + ) + }) } pub async fn execute>(