Change error handling to warning

Fixes a bug where removing a hot-plugged device mid-loop causes a filesystem error that turns into a fatal runtime error that crashes waybar entirely, changed to warning instead of runtime error.
This commit is contained in:
InetAddress
2026-06-12 04:38:10 +00:00
committed by GitHub
parent 05945748dc
commit 61178f7b0e
+1 -1
View File
@@ -153,7 +153,7 @@ void waybar::modules::Battery::refreshBatteries() {
}
}
} catch (fs::filesystem_error& e) {
throw std::runtime_error(e.what());
spdlog::warn("Battery directory tracking failed: {}", e.what());
}
if (warnFirstTime_ && batteries_.empty()) {
if (config_["bat"].isString()) {