From 2b21d1cb473fedbf7f7c7f794d969e892b84d071 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 4 Dec 2015 14:47:40 +0100 Subject: [PATCH] StorageBackend::iter_files(): Add caused_by use --- src/storage/backend.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/storage/backend.rs b/src/storage/backend.rs index 16dd904a..998781e5 100644 --- a/src/storage/backend.rs +++ b/src/storage/backend.rs @@ -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 }) }