Skip to content

Commit 40ead9f

Browse files
rsionnachclaude
andcommitted
docs: add exception handling enforcement conventions to CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5ba48b5 commit 40ead9f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ When fixing a GitHub Issue: `fix: <description> (<bead-id>, closes #<number>)`
254254
- Never use bare `Exception` or `RuntimeError` in application code
255255
- Provider modules define their own error subclasses: `GrafanaProviderError(ProviderError)`
256256
- Import errors from `nthlayer.core.errors`
257+
- Silently swallowed exceptions (bare `except` or `except Exception: pass`) must have explicit `# intentionally ignored: <reason>` comment
258+
- Golden Principle #4: Re-raise exceptions with context using `raise XError("doing X") from err` at layer boundaries
257259

258260
### Dashboard Template Architecture
259261
- Templates live in `src/nthlayer/dashboards/templates/`

0 commit comments

Comments
 (0)