refactor: log swallowed exceptions across src/

Replace silent swallow-excepts (pass/return/continue) with
logger.warning recording the caught error, preserving behaviour.
This commit is contained in:
sankalp committed 2026-07-14 13:02:21 +05:45
1 parent c0a4b1b792
commit f72542a231
49 files changed
+1004 -363

No files matched your search

+8 -4
View File
@@ -417,8 +417,10 @@ class WifiConnections(Box):
self.other_networks_scrolled.height_animator.disconnect(
self._anim_finished_handler
)
except Exception:
pass
except Exception as e:
logger.warning(
f"[wifi] self.other_networks_scrolled.height_animator.disconnect( ... failed: {e}"
)
self._anim_finished_handler = None
def _refresh_after_animation(self):
@@ -477,8 +479,10 @@ class WifiConnections(Box):
spawn_detached(["nm-connection-editor"])
if self.parent and hasattr(self.parent, "hide_controlcenter"):
self.parent.hide_controlcenter()
except FileNotFoundError:
pass
except FileNotFoundError as e:
logger.warning(
f"[wifi] spawn_detached(['nm-connection-editor']) failed: {e}"
)
except Exception as e:
logger.error(f"[WiFi] Failed to open network settings: {e}")