From a43c38c118c6b705c757b47a88c0a573ebd80682 Mon Sep 17 00:00:00 2001 From: Nadja Reitzenstein Date: Tue, 31 May 2022 13:11:48 +0200 Subject: [PATCH] Better errors when the db directory is missing --- bffhd/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bffhd/lib.rs b/bffhd/lib.rs index 8aeecc8..33e4549 100644 --- a/bffhd/lib.rs +++ b/bffhd/lib.rs @@ -84,7 +84,8 @@ impl Diflouroborane { let executor = Executor::new(); - let env = StateDB::open_env(&config.db_path)?; + let env = StateDB::open_env(&config.db_path) + .context("Failed to create state DB env. Does the parent directory for `db_path` exist?")?; let statedb = StateDB::create_with_env(env.clone()).context("Failed to open state DB file")?;