feat(src/services): improve error handlingwith detailed logging

Replace silent exception swallowing with explicit logging via logger.error to aid debugging and observability
This commit is contained in:
sankalp committed 2026-06-17 05:20:44 +05:45
1 parent 260d215b6b
commit 48231b3bc2
5 files changed
+27 -25

No files matched your search

+6 -6
View File
@@ -134,8 +134,8 @@ class BluetoothDevice(Service):
try:
self._battery_proxy = _make_proxy(bus, object_path, BLUEZ_BATTERY_IFACE)
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
self._prop_sub_id = bus.signal_subscribe(
BLUEZ_SERVICE,
@@ -153,8 +153,8 @@ class BluetoothDevice(Service):
v = self._proxy.get_cached_property(name)
if v is not None:
return v.unpack()
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
return _unpack_variant(self._props.get(name))
def _get_battery_prop(self, name: str):
@@ -319,8 +319,8 @@ class BluetoothAdapter(Service):
v = self._proxy.get_cached_property(name)
if v is not None:
return v.unpack()
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
return _unpack_variant(self._props.get(name))
def _set_prop(self, name: str, value: GLib.Variant):