From 81b569f912d6b5e734880b2ec215ecff72dc9f17 Mon Sep 17 00:00:00 2001 From: Mihir Lad Date: Wed, 29 Jul 2020 21:47:37 -0400 Subject: [PATCH] dwm: Throw module_error if reconnect fails If reconnect fails, the rest of the module is useless. Better to throw a module_error in case of any predictable dwmipc errors. --- src/modules/dwm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/dwm.cpp b/src/modules/dwm.cpp index 740ec741..14fabded 100644 --- a/src/modules/dwm.cpp +++ b/src/modules/dwm.cpp @@ -437,6 +437,7 @@ namespace modules { return true; } catch (const dwmipc::IPCError& err) { m_log.err("%s: Failed to reconnect to socket: %s", name(), err.what()); + throw module_error(err.what()); } return false; }