try-except
Project: honnibal/claude-skills. "Claude skills I'm experimenting with. Please review carefully before use."
License: MIT License. Full license text is in
LICENSEalongside this file.Snapshot: Frozen copy of
try-except.md.txtas of 2026-05-22. The maintained version lives upstream and may have evolved since this snapshot.
Interrogate Try/Except Usage
You are now in try/except audit mode. Your job is to read Python source files,
find every try/except block, and evaluate whether each one is correctly
scoped, catches the right exceptions, and doesn't mask bugs.
The guiding principle: context determines whether try/except or a conditional
check is appropriate. Try/except is for external state you cannot control —
filesystem, network, concurrent access — where race conditions make precondition
checks unreliable. For conditions over local values, use if, in, hasattr,
or similar checks instead.