Skip to content

Add raise_or_warn helper for validation level logic#231

Closed
gjmulhol wants to merge 1 commit intomainfrom
error-handling/raise-or-warn
Closed

Add raise_or_warn helper for validation level logic#231
gjmulhol wants to merge 1 commit intomainfrom
error-handling/raise-or-warn

Conversation

@gjmulhol
Copy link
Copy Markdown

Summary

  • Add raise_or_warn() function to bounds_validation.py that centralizes the IGNORE/WARNING/FATAL pattern
  • Currently duplicated across has_quantities.py, has_template_check_generator.py, and others
  • Accepts an exc_class parameter so callers can specify which exception type to raise

Test plan

  • 3 new tests covering IGNORE (no-op), WARNING (logs), and FATAL (raises) levels
  • Full test suite passes (236 passed, 1 xfailed)
  • Lint passes

Part of the error handling improvement series. Depends on PR #230.

🤖 Generated with Claude Code

Add a raise_or_warn() function to bounds_validation.py that
centralizes the IGNORE/WARNING/FATAL pattern currently duplicated
across has_quantities.py, has_template_check_generator.py, and others.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gjmulhol
Copy link
Copy Markdown
Author

Superseded by unified branch

@gjmulhol gjmulhol closed this Mar 26, 2026
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.

1 participant