From 7187ad89b1a2c853ca7937c9774c0794198db282 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 31 Jul 2016 10:39:43 +0200 Subject: [PATCH] If an error happens while viewing, trace it --- imag-diary/src/view.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imag-diary/src/view.rs b/imag-diary/src/view.rs index 0d0f5317..e96e0649 100644 --- a/imag-diary/src/view.rs +++ b/imag-diary/src/view.rs @@ -24,7 +24,9 @@ pub fn view(rt: &Runtime) { for entry in entries.into_iter().filter_map(Result::ok) { let id = entry.diary_id(); println!("{} :\n", id); - pv.view_entry(&entry); + if let Err(e) = pv.view_entry(&entry) { + trace_error(&e); + }; println!("\n---\n"); } },