Better errors when the db directory is missing

This commit is contained in:
Nadja Reitzenstein 2022-05-31 13:11:48 +02:00
parent 84a4e9791e
commit a43c38c118

View File

@ -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")?;