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

+24
View File
@@ -35,8 +35,32 @@ def run_lock():
lock_main()
def run_spotlight(argv):
from window.spotlight.app import main as spotlight_main
command = ""
text = ""
external = False
positional = []
for arg in argv:
if arg == "--external":
external = True
else:
positional.append(arg)
if positional:
command = positional[0]
if len(positional) > 1:
text = " ".join(positional[1:])
spotlight_main(command=command, text=text, external=external)
if __name__ == "__main__":
if len(sys.argv) > 1 and sys.argv[1] == "lock":
run_lock()
elif len(sys.argv) > 1 and sys.argv[1] == "spotlight":
run_spotlight(sys.argv[2:])
else:
run_app()