From 6c9add4dd794f9db9a23be59dac960e06f8a7b02 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Sun, 19 Jun 2022 11:46:51 +0200 Subject: [PATCH] log error --- src/input/playlist.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/input/playlist.rs b/src/input/playlist.rs index d6149388..47513422 100644 --- a/src/input/playlist.rs +++ b/src/input/playlist.rs @@ -56,7 +56,9 @@ impl CurrentProgram { }); let json: String = serde_json::to_string(&data).expect("Serialize status data failed"); - fs::write(config.general.stat_file.clone(), &json).expect("Unable to write file"); + if let Err(e) = fs::write(config.general.stat_file.clone(), &json) { + error!("Unable to write status file: {e}"); + }; } Self {