From db3d78ba699e08d0f46b1e722194cd705b0f64b6 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Sat, 7 Jan 2017 19:48:40 -0800 Subject: [PATCH] better error msg if unable to open sample file dir --- src/dir.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dir.rs b/src/dir.rs index a793ff9..687fc4f 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -102,7 +102,8 @@ impl Fd { impl SampleFileDir { pub fn new(path: &str, db: Arc) -> Result, Error> { - let fd = Fd::open(path)?; + let fd = Fd::open(path) + .map_err(|e| Error::new(format!("unable to open sample file dir {}: {}", path, e)))?; Ok(Arc::new(SampleFileDir{ db: db, fd: fd,