summaryrefslogtreecommitdiffstats
path: root/lib/entry/libimagentryurl/src/iter.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-12-23 13:38:52 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-12-23 13:38:52 +0100
commite12ee775ada7ca26d715501336ba7d1af665eea1 (patch)
tree494e06858d49e2f899b92823fed10b100d21ea24 /lib/entry/libimagentryurl/src/iter.rs
parent1c5a81d5b024ef90a45345dc3dc13481afb7929a (diff)
parent02604ae58be17a9ab980b24b29192500c6658f9d (diff)
Merge branch 'replace-map-dbg-err' into master
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
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)
})
});