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

+9 -2
View File
@@ -248,6 +248,7 @@ class HyprlandCaptureBackend(CaptureBackend):
try:
proc.wait_finish(task)
except Exception as error:
logger.warning(f"[capture] proc.wait_finish(task) failed: {error}")
on_result(CaptureResult.failure(str(error)))
return
if expected.exists():
@@ -338,7 +339,10 @@ class HyprlandCaptureBackend(CaptureBackend):
def on_done(proc: Gio.Subprocess, task: Gio.Task) -> None:
try:
_, stdout, _ = proc.communicate_utf8_finish(task)
except Exception:
except Exception as e:
logger.warning(
f"[capture] _, stdout, _ = proc.communicate_utf8_finish(task) failed: {e}"
)
on_geometry(None)
return
on_geometry(stdout.strip() if stdout else None)
@@ -372,7 +376,10 @@ class HyprlandCaptureBackend(CaptureBackend):
def on_done(proc: Gio.Subprocess, task: Gio.Task) -> None:
try:
_, stdout, _ = proc.communicate_utf8_finish(task)
except Exception:
except Exception as e:
logger.warning(
f"[capture] _, stdout, _ = proc.communicate_utf8_finish(task) failed: {e}"
)
on_geometry(None)
return
on_geometry(stdout.strip() if stdout else None)