Skip to content

Add hint support to CitrineException#1029

Closed
gjmulhol wants to merge 1 commit intomainfrom
feature/exception-hint-support
Closed

Add hint support to CitrineException#1029
gjmulhol wants to merge 1 commit intomainfrom
feature/exception-hint-support

Conversation

@gjmulhol
Copy link
Copy Markdown

Summary

  • Add optional hint keyword argument to CitrineException.__init__
  • Override __str__ to append \n\nHint: <hint> when hint is present
  • Foundation for adding actionable hints to all exception subclasses

Test plan

  • 7 new tests in tests/test_exceptions.py
  • All 1349 tests pass (1342 existing + 7 new)

🤖 Generated with Claude Code

PR 2 of 11 in the error handling improvement series. PRs 3, 5, 11 depend on this.

Add optional 'hint' keyword argument to CitrineException that
appends actionable guidance to error messages. When present,
__str__ outputs the base message followed by "\n\nHint: <hint>".

This is the foundation for adding actionable hints to all
exception subclasses in subsequent PRs.

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

Consolidated into docs/improve-sdk-documentation branch.

@gjmulhol gjmulhol closed this Mar 25, 2026
@gjmulhol gjmulhol deleted the feature/exception-hint-support branch March 25, 2026 22:26
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