From a17220054d6729ca5c1a886828d4c7c6ab0fc098 Mon Sep 17 00:00:00 2001 From: Alexis Date: Sat, 24 Nov 2018 11:20:03 +0100 Subject: [PATCH] feat(client): pefix module name on update error --- src/bar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bar.cpp b/src/bar.cpp index 1bbb40d..b28e920 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -184,11 +184,11 @@ void waybar::Bar::getModules(const Factory& factory, const std::string& pos) if (pos == "modules-right") { modules_right_.emplace_back(module); } - module->dp.connect([module] { + module->dp.connect([module, &name] { try { module->update(); } catch (const std::exception& e) { - std::cerr << e.what() << std::endl; + std::cerr << name.asString() + ": " + e.what() << std::endl; } }); } catch (const std::exception& e) {