1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-18 13:55:11 -05:00

fix(timer_module): Catch warmup exceptions

Refs #399
This commit is contained in:
Michael Carlberg 2017-01-31 12:38:37 +01:00
parent 82d360e634
commit 6fa2d3943c

View file

@ -25,11 +25,11 @@ namespace modules {
return CAST_MOD(Impl)->update(); return CAST_MOD(Impl)->update();
}; };
try {
// warm up module output before entering the loop // warm up module output before entering the loop
check(); check();
CAST_MOD(Impl)->broadcast(); CAST_MOD(Impl)->broadcast();
try {
while (this->running()) { while (this->running()) {
if (check()) { if (check()) {
CAST_MOD(Impl)->broadcast(); CAST_MOD(Impl)->broadcast();