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:
49 files changed
+1004
-363
No files matched your search
@@ -535,8 +535,10 @@ class BluetoothConnections(Box):
|
||||
self.other_devices_scrolled.height_animator.disconnect(
|
||||
self._anim_finished_handler
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"[bluetooth] self.other_devices_scrolled.height_animator.disconnect( s... failed: {e}"
|
||||
)
|
||||
self._anim_finished_handler = None
|
||||
|
||||
def _refresh_after_animation(self):
|
||||
@@ -558,8 +560,10 @@ class BluetoothConnections(Box):
|
||||
spawn_detached(["blueman-manager"])
|
||||
if self.parent and hasattr(self.parent, "hide_controlcenter"):
|
||||
self.parent.hide_controlcenter()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
except FileNotFoundError as e:
|
||||
logger.warning(
|
||||
f"[bluetooth] spawn_detached(['blueman-manager']) failed: {e}"
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"[Bluetooth] Failed to open bluetooth settings: {e}")
|
||||
|
||||
|
||||
Reference in new issue
Block a user