From a855647d452a938a8a8a49edbd5aff5355430f89 Mon Sep 17 00:00:00 2001 From: Emile Date: Thu, 3 Feb 2022 21:51:45 +0100 Subject: better error handling --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 9a310b0..d3ffd6e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -217,7 +217,9 @@ fn write_nav(file: &mut File, in_path: &Path, raw_path: &Path) let name = d.file_name().unwrap().to_str().unwrap(); let rel_link = d.strip_prefix(abs_inpath) - .expect("could not strip inpath prefix"); + .expect(format!( + "could not strip the in_path prefix: {:?}", + d).as_str()); let link = Path::new("/").join(rel_link); let link = link.as_path().to_str().unwrap(); -- cgit 1.4.1