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
@@ -64,7 +64,10 @@ class CapsLock(Service):
|
||||
if brightness_path.exists():
|
||||
try:
|
||||
return bool(int(brightness_path.read_text().strip()))
|
||||
except (ValueError, OSError):
|
||||
except (ValueError, OSError) as e:
|
||||
logger.warning(
|
||||
f"[capslock] return bool(int(brightness_path.read_text().strip())) failed: {e}"
|
||||
)
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
Reference in new issue
Block a user