Fix imag-bookmark error handling

This commit is contained in:
Matthias Beyer 2018-02-12 21:02:40 +01:00
parent c0000b6410
commit 86abfb88a4

View file

@ -52,7 +52,7 @@ use libimagbookmark::collection::BookmarkCollection;
use libimagbookmark::collection::BookmarkCollectionStore;
use libimagbookmark::error::BookmarkError as BE;
use libimagbookmark::link::Link as BookmarkLink;
use libimagerror::trace::{MapErrTrace, trace_error, trace_error_exit};
use libimagerror::trace::{MapErrTrace, trace_error};
mod ui;
@ -130,8 +130,7 @@ fn list(rt: &Runtime) {
.ok_or(BE::from(format!("No BookmarkcollectionStore '{}' found", coll)))
.map_err_trace_exit_unwrap(1);
match collection.links(rt.store()) {
Ok(links) => {
let links = collection.links(rt.store()).map_err_trace_exit_unwrap(1);
debug!("Listing...");
for (i, link) in links.enumerate() {
match link {
@ -140,9 +139,6 @@ fn list(rt: &Runtime) {
}
};
debug!("... ready with listing");
},
Err(e) => trace_error_exit(&e, 1),
}
info!("Ready");
}