From 69f11cdcf774c15b73a0f390b4f3efab40b10ef5 Mon Sep 17 00:00:00 2001 From: Henrik Friedrichsen Date: Mon, 7 Sep 2020 23:38:13 +0200 Subject: [PATCH] gracefully handle error when showing notification fixes #265 --- src/queue.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/queue.rs b/src/queue.rs index 3818634..f929bf6 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -221,10 +221,9 @@ impl Queue { current.replace(index); self.spotify.update_track(); if self.spotify.cfg.notify.unwrap_or(false) { - Notification::new() - .summary(&track.to_string()) - .show() - .unwrap(); + if let Err(e) = Notification::new().summary(&track.to_string()).show() { + error!("error showing notification: {:?}", e); + } } }