Skip to content

Replace bare rescue clauses with explicit StandardError#9

Merged
johngallagher merged 1 commit into
claude/fix-code-smells-o11wKfrom
claude/fix-bare-rescues-o11wK
Mar 9, 2026
Merged

Replace bare rescue clauses with explicit StandardError#9
johngallagher merged 1 commit into
claude/fix-code-smells-o11wKfrom
claude/fix-bare-rescues-o11wK

Conversation

@johngallagher

Copy link
Copy Markdown
Contributor

Replaces all bare rescue clauses with explicit rescue StandardError to avoid accidentally catching exceptions like Interrupt and SystemExit. Affects instrumenter.rb and structured_error.rb.

Bare rescue catches all StandardError subclasses implicitly, but also
signals unclear intent. Being explicit with 'rescue StandardError' makes
the intent obvious and passes linting checks.

Fixes 10 occurrences across instrumenter.rb (5) and structured_error.rb (5).

https://claude.ai/code/session_01KWZUse79XR68i6nGa8VgTu
@johngallagher johngallagher merged commit 98fab5a into claude/fix-code-smells-o11wK Mar 9, 2026
23 checks passed
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.

2 participants