Add error printing (debug) in GlobStoreIdIterator helper type

This commit is contained in:
Matthias Beyer 2016-05-12 17:24:27 +02:00
parent 5972ce7f37
commit a510e1b6b6

View file

@ -181,7 +181,15 @@ impl Iterator for GlobStoreIdIterator {
type Item = StoreId;
fn next(&mut self) -> Option<StoreId> {
self.paths.next().and_then(|o| o.ok()).map(|p| StoreId::from(p))
self.paths.next().and_then(|o| {
match o {
Ok(o) => Some(o),
Err(e) => {
debug!("GlobStoreIdIterator error: {:?}", e);
None
},
}
}).map(|p| StoreId::from(p))
}
}