summaryrefslogtreecommitdiffstats
path: root/lib/entry/libimagentryurl/src/iter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/entry/libimagentryurl/src/iter.rs')
-rw-r--r--lib/entry/libimagentryurl/src/iter.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/entry/libimagentryurl/src/iter.rs b/lib/entry/libimagentryurl/src/iter.rs
index 4a22a6b1..f899cb38 100644
--- a/lib/entry/libimagentryurl/src/iter.rs
+++ b/lib/entry/libimagentryurl/src/iter.rs
@@ -32,9 +32,10 @@
use libimagentrylink::link::Link;
use libimagentrylink::iter::LinkIter;
use libimagstore::store::Store;
-use libimagutil::debug_result::DebugResult;
use failure::Fallible as Result;
+use failure::ResultExt;
+use failure::Error;
use url::Url;
/// Helper for building `OnlyUrlIter` and `NoUrlIter`
@@ -170,14 +171,15 @@ impl<'a> Iterator for UrlIter<'a> {
debug!("Retrieving entry for id: '{:?}'", id);
self.1
.retrieve(id.clone())
- .map_dbg_err(|_| format!("Retrieving entry for id: '{:?}' failed", id))
+ .with_context(|e| format!("Retrieving entry for id: '{:?}' failed: {}", id, e))
.map_err(From::from)
.and_then(|f| {
debug!("Store::retrieve({:?}) succeeded", id);
debug!("getting uri link from file now");
f.get_url()
- .map_dbg_str("Error happened while getting link URI from FLE")
- .map_dbg_err(|e| format!("URL -> Err = {:?}", e))
+ .context("Error happened while getting link URI from FLE")
+ .with_context(|e| format!("URL -> Err = {:?}", e))
+ .map_err(Error::from)
})
});