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>(