feat: better error messages

Provide "No such file or directory" error if file is not found.
Provide "Unknown Error" if other error found

Should reduce confusion from the generic other error
This commit is contained in:
andy.boot
2024-01-03 23:07:06 +00:00
parent cd53fc7494
commit 81dde7005e
4 changed files with 112 additions and 51 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ pub fn test_with_bad_param() {
let mut cmd = Command::cargo_bin("dust").unwrap();
let result = cmd.arg("bad_place").unwrap();
let stderr = str::from_utf8(&result.stderr).unwrap();
assert!(stderr.contains("Did not have permissions for all directories"));
assert!(stderr.contains("No such file or directory"));
}
#[test]