StorageBackend::iter_files(): Add caused_by use

This commit is contained in:
Matthias Beyer 2015-12-04 14:47:40 +01:00
parent 90e3f44005
commit 2b21d1cb47

View file

@ -83,10 +83,11 @@ impl StorageBackend {
.into_iter())
})
.map_err(|e| {
let serr = StorageBackendError::new(
"iter_files()",
"Cannot iter on files",
None);
debug!("StorageBackend::iter_ids() returned error = {:?}", e);
let mut serr = StorageBackendError::new("iter_files()",
"Cannot iter on files",
None);
serr.caused_by = Some(Box::new(e));
serr
})
}