Skip to content

fix: replace 15 bare except clauses with except Exception#1950

Open
haosenwang1018 wants to merge 1 commit intoFoundationAgents:mainfrom
haosenwang1018:fix/bare-excepts
Open

fix: replace 15 bare except clauses with except Exception#1950
haosenwang1018 wants to merge 1 commit intoFoundationAgents:mainfrom
haosenwang1018:fix/bare-excepts

Conversation

@haosenwang1018
Copy link
Copy Markdown

What

Replace 15 bare except: clauses with except Exception: across multiple files.

Why

Bare except: catches BaseException, including KeyboardInterrupt and SystemExit, which can:

  • Prevent clean process shutdown (Ctrl+C ignored)
  • Mask critical system errors
  • Make debugging harder by silently swallowing unexpected exceptions

Using except Exception: catches all application-level errors while allowing system-level exceptions to propagate correctly.

Bare `except:` catches BaseException including KeyboardInterrupt and
SystemExit. Replaced 15 instances with `except Exception:`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant