From 4e4344624e004d1a286f82a43238decba3acc341 Mon Sep 17 00:00:00 2001 From: Jeff Baskin Date: Sat, 3 Dec 2022 08:26:21 -0500 Subject: [PATCH] Improved error message. --- src/morethantext/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/morethantext/mod.rs b/src/morethantext/mod.rs index 1e4c13e..117b0cb 100644 --- a/src/morethantext/mod.rs +++ b/src/morethantext/mod.rs @@ -15,7 +15,7 @@ impl MoreThanText { match create_dir(data_dir).await { Ok(_) => (), Err(err) => { - let mut error = DBError::new("failed to initialize"); + let mut error = DBError::new("failed to create data directory"); error.add_source(err); return Err(error); } @@ -58,7 +58,7 @@ mod init { match MoreThanText::new("kljsdgfhslkfrh").await { Ok(_) => assert!(false, "This test should fail to create a data directory"), Err(err) => { - assert_eq!(err.to_string(), "failed to initialize"); + assert_eq!(err.to_string(), "failed to create data directory"); assert!(err.source().is_some(), "Must include the source error."); } };