Skip to content

fix: narrow bare except Exception in VS Code settings merge (import of github/spec-kit#3844) - #132

Open
one-kash wants to merge 1 commit into
mainfrom
import/pr-3844
Open

fix: narrow bare except Exception in VS Code settings merge (import of github/spec-kit#3844)#132
one-kash wants to merge 1 commit into
mainfrom
import/pr-3844

Conversation

@one-kash

Copy link
Copy Markdown

Imported from upstream PR github#3844
Original author: @Quratulain-bilal
Original head branch: fix/utils-narrow-exception


Summary

Narrow bare except Exception to specific exception types to let programming errors propagate.

Changes

  • _utils.py: Replace except Exception with (OSError, ValueError, KeyError)

Replace overly broad except Exception with (OSError, ValueError, KeyError)
to let programming errors like TypeError or AttributeError propagate while
still handling expected I/O and parse errors gracefully.
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