Skip to content

refactor: extract exception handling to Function base class#8

Merged
rustyconover merged 2 commits into
mainfrom
extract-exception-handling-mixin
Jan 5, 2026
Merged

refactor: extract exception handling to Function base class#8
rustyconover merged 2 commits into
mainfrom
extract-exception-handling-mixin

Conversation

@rustyconover

Copy link
Copy Markdown
Contributor

Summary

  • Move _should_terminate to Function base class (was duplicated in 3 places)
  • Add _create_error_output helper to Function base class
  • Update _process_with_exception_handling in all function types to use the new helper

Test plan

  • All existing tests pass (529 tests)
  • Mypy type checking passes
  • Ruff linting passes

🤖 Generated with Claude Code

rustyconover and others added 2 commits January 4, 2026 21:49
Move _should_terminate and add _create_error_output helper to the
Function base class, eliminating duplication across
ScalarFunctionGenerator, TableFunctionGenerator, and
TableInOutGeneratorFunction.

- Add _should_terminate() to Function (was duplicated 3x)
- Add _create_error_output() helper to Function
- Update _process_with_exception_handling in all 3 classes to use helper
- Net reduction of 9 lines of code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rustyconover rustyconover merged commit 2a02dd8 into main Jan 5, 2026
0 of 16 checks passed
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