about summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorEmile <git@emile.space>2022-02-03 21:51:45 +0100
committerEmile <git@emile.space>2022-02-03 21:51:45 +0100
commita855647d452a938a8a8a49edbd5aff5355430f89 (patch)
treee15fd92344c87b9b9a4b63d972a2a7eaca4923e4 /src/main.rs
parent3f9823c61021ec53fb0af257c4677dfe1736e00d (diff)
better error handling
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
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();