This is an automated email from the ASF dual-hosted git repository. jt2594838 pushed a commit to branch codex/exception-context-guidance in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 06d6cfe7f935826f5f09e8378f9283ad225c1c36 Author: Tian Jiang <[email protected]> AuthorDate: Tue Nov 24 11:19:44 2026 +0800 docs: clarify exception context guidance --- AGENTS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 252cf536852..7b7e48c2971 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -139,6 +139,12 @@ the corresponding module file; link to existing guidance instead of copying it. - **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 + condition, such as the field being decoded, the expected condition, and the actual value or + available input length when safe. Avoid empty or generic exceptions such as `throw new IOException()` + when useful context is available. Preserve the cause when wrapping another exception. Do not include + secrets or entire payloads in messages. User-facing exception messages must follow the i18n rules + below. ## Architecture
