continuedev / continuedev/continue
Exception type too broad in error handling
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Bug Report
Description
Some except clauses catch overly broad exception types (e.g., bare except: or except Exception:), which can accidentally swallow important errors like KeyboardInterrupt or SystemExit.
Example
# Problematic:
try:
do_something()
except: # catches EVERYTHING including KeyboardInterrupt
pass
# Better:
try:
do_something()
except ValueError as e:
logger.warning(f"Value error: {e}")
Expected Behavior
Exception handlers should catch only the specific exceptions they know how to handle.
Impact
- Makes it impossible to interrupt the program with Ctrl+C in some cases
- Hides unexpected errors that should be investigated
- Makes debugging significantly harder
Suggested Fix
Replace broad except clauses with specific exception types wherever possible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Search the repository for bare except and except Exception: clauses, then inspect each handler to identify the exceptions it is intended to handle. Done means broad handlers are replaced where possible without swallowing interruption or unexpected errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100