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.
Bug Report
Description
Some
exceptclauses catch overly broad exception types (e.g., bareexcept:orexcept Exception:), which can accidentally swallow important errors likeKeyboardInterruptorSystemExit.Example
Expected Behavior
Exception handlers should catch only the specific exceptions they know how to handle.
Impact
Suggested Fix
Replace broad
exceptclauses with specific exception types wherever possible.