From 3ad7bbf1ef91fa22f40965acd788be8ce5ae60d5 Mon Sep 17 00:00:00 2001 From: Marc Planard Date: Sat, 3 Jun 2023 16:36:06 +0200 Subject: [PATCH] log error --- src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 54c6942..0dd37c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,14 @@ pub fn main() -> Result<(), Box> { r.store(false, Ordering::SeqCst); }).expect("Error setting Ctrl-C handler"); - let mut rs = RedisCtrl::new()?; + let mut rs = match RedisCtrl::new() { + Ok(rs) => rs, + Err(err) => { + println!("Unable to connect to redis: {:?}", err); + return Err(err) + } + }; + let controller = NativeHeliosDacController::new()?; let devices = controller.list_devices()?;