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 -2
View File
@@ -438,7 +438,10 @@ def is_night_light_active() -> bool:
try:
_night_light_active = bool(find_process_pid("hyprsunset"))
return _night_light_active
except Exception:
except Exception as e:
logger.warning(
f"[modus] _night_light_active = bool(find_process_pid('hyprsunset')) failed: {e}"
)
return False
@@ -572,7 +575,10 @@ def open_trash():
if find_binary(fm):
spawn_detached([fm, trash_path])
return
except Exception:
except Exception as e:
logger.warning(
f"[modus] if find_binary(fm): spawn_detached([fm, trash_path]) return failed: {e}"
)
continue