diff --git a/store/src/lmdb.rs b/store/src/lmdb.rs index 9b326daee..365da6983 100644 --- a/store/src/lmdb.rs +++ b/store/src/lmdb.rs @@ -66,7 +66,8 @@ pub fn new_env(path: String) -> lmdb::Environment { /// Create a new LMDB env under the provided directory with the provided name. pub fn new_named_env(path: String, name: String) -> lmdb::Environment { let full_path = [path, name].join("/"); - fs::create_dir_all(&full_path).unwrap(); + fs::create_dir_all(&full_path) + .expect("Unable to create directory 'db_root' to store chain_data"); let mut env_builder = lmdb::EnvBuilder::new().unwrap(); env_builder.set_maxdbs(8).unwrap(); diff --git a/util/src/logger.rs b/util/src/logger.rs index 2634457ec..e5048267c 100644 --- a/util/src/logger.rs +++ b/util/src/logger.rs @@ -136,7 +136,7 @@ pub fn init_logger(config: Option) { .append(c.log_file_append) .encoder(Box::new(PatternEncoder::new(&LOGGING_PATTERN))) .build(c.log_file_path, Box::new(policy)) - .unwrap(), + .expect("Failed to create logfile"), ) } else { Box::new( @@ -144,7 +144,7 @@ pub fn init_logger(config: Option) { .append(c.log_file_append) .encoder(Box::new(PatternEncoder::new(&LOGGING_PATTERN))) .build(c.log_file_path) - .unwrap(), + .expect("Failed to create logfile"), ) } };