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

+6 -6
View File
@@ -101,8 +101,8 @@ class PlayerBoxStack(Box):
for obj, handler_id in self._signal_connections:
try:
obj.disconnect(handler_id)
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
self._signal_connections.clear()
super().destroy()
@@ -451,8 +451,8 @@ class PlayerBox(Box):
self.play_pause_icon.dynamic_file(
"player/play.svg" if status == "paused" else "player/Pause.svg"
)
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
def _on_playback_change(self, *_):
if self.exit or self.player is None:
@@ -482,6 +482,6 @@ class PlayerBox(Box):
for obj, handler_id in self._signal_connections:
try:
obj.disconnect(handler_id)
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
super().destroy()