Skip to content

docs: clarify exception context guidance - #19377

Merged
jt2594838 merged 1 commit into
masterfrom
codex/exception-context-guidance
Nov 24, 2026
Merged

jt2594838 merged 1 commit into
masterfrom
codex/exception-context-guidance

Conversation

@jt2594838

Copy link
Copy Markdown
Contributor

Summary

  • Add repository-wide guidance to include diagnostic context in exceptions.
  • Clarify preserving causes when wrapping exceptions, avoiding sensitive data in messages, and following the existing i18n rules.

Example

Before, throw new IOException() gives no indication of the failed operation or input condition. The guidance now asks for safe details such as the decoded field, expected condition, and actual value or available input length.

Validation

  • git diff --check

Comment thread AGENTS.md
- **Spotless** with Google Java Format (GOOGLE style). Import order: `org.apache.iotdb`, blank, `javax`, `java`, static.
- **Checkstyle** is also configured (see `checkstyle.xml` at project root).
- Java source/target level is 17 (compiled with `maven.compiler.release=17` on JDK 17+).
- **Exception context.** Include enough diagnostic context to identify the failed operation and

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repository-wide rule gives maintainers actionable diagnostics for serialization and validation failures by asking exception messages to identify the operation and safe input context. It also preserves wrapped causes and keeps user-facing messages aligned with the existing i18n guidance. In StreamIntent decoding, this context can identify a short buffer, invalid status ordinal, or missing assignedTo value.

@Caideyipi Caideyipi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 06d6cfe. No actionable findings.

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.59%. Comparing base (dd450f7) to head (06d6cfe).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19377      +/-   ##
============================================
+ Coverage     49.44%   49.59%   +0.15%     
  Complexity      718      718              
============================================
  Files          5656     5671      +15     
  Lines        418222   419616    +1394     
  Branches      55296    55507     +211     
============================================
+ Hits         206769   208106    +1337     
- Misses       211453   211510      +57     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jt2594838
jt2594838 merged commit 1a97335 into master Nov 24, 2026
38 of 40 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.

2 participants