refactor(src/window):improve error handling with logging

This commit is contained in:
sankalp committed 2026-06-17 05:21:36 +05:45
1 parent 420688e9a7
commit 9cbde2c58f
26 files changed
+239 -211

No files matched your search

+3 -2
View File
@@ -1,3 +1,4 @@
from fabric.utils import logger
from fabric.hyprland.widgets import HyprlandWorkspaces, WorkspaceButton
from fabric.widgets.box import Box
@@ -105,8 +106,8 @@ class WorkspaceIndicator(Box):
if self._on_config_changed in _config_handlers:
_config_handlers.remove(self._on_config_changed)
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
if hasattr(self, "workspaces") and self.workspaces:
self.workspaces.destroy()
Box.destroy(self)