feat(client): pefix module name on update error

This commit is contained in:
Alexis 2018-11-24 11:20:03 +01:00
parent 4cc48b3cfd
commit a17220054d
1 changed files with 2 additions and 2 deletions

View File

@ -184,11 +184,11 @@ void waybar::Bar::getModules(const Factory& factory, const std::string& pos)
if (pos == "modules-right") { if (pos == "modules-right") {
modules_right_.emplace_back(module); modules_right_.emplace_back(module);
} }
module->dp.connect([module] { module->dp.connect([module, &name] {
try { try {
module->update(); module->update();
} catch (const std::exception& e) { } catch (const std::exception& e) {
std::cerr << e.what() << std::endl; std::cerr << name.asString() + ": " + e.what() << std::endl;
} }
}); });
} catch (const std::exception& e) { } catch (const std::exception& e) {