Skip to content

enhance: esp8266 add more text to exceptions numbers#49

Merged
Jason2866 merged 16 commits into
mainfrom
human_read_exc
May 5, 2026
Merged

enhance: esp8266 add more text to exceptions numbers#49
Jason2866 merged 16 commits into
mainfrom
human_read_exc

Conversation

@Jason2866
Copy link
Copy Markdown
Owner

@Jason2866 Jason2866 commented May 5, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved exception messages for crash reports with more descriptive, human-readable descriptions. Exception codes now display with detailed context information instead of abbreviated identifiers, enabling faster diagnosis of microcontroller issues.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@Jason2866 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 32 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1a503d63-a167-4fdf-bdd4-e7a8849a793e

📥 Commits

Reviewing files that changed from the base of the PR and between 6b5cf1b and 19f7841.

📒 Files selected for processing (1)
  • src/crashDecoder.ts
📝 Walkthrough

Walkthrough

Updated Xtensa exception handling by replacing short exception identifiers with detailed human-readable descriptions. Enhanced parseXtensaFaultInfo to format fault messages as Exception <code>: <description> when an exception description is available. Tests updated to verify the new message format.

Changes

Xtensa Exception Descriptions and Message Formatting

Layer / File(s) Summary
Data Constants
src/crashDecoder.ts (lines 1440–1473)
XTENSA_EXCEPTIONS array replaced with detailed ESP8266/Xtensa exception descriptions (including null entries for reserved codes) instead of brief identifiers.
Fault Message Formatting
src/crashDecoder.ts (lines 1701–1703)
parseXtensaFaultInfo updated to format faultMessage as Exception ${faultCode}: ${desc} when an exception description is available, with proper concatenation when a prior message exists.
Test Assertions
src/test/crashDecoder.test.ts (lines 429–437, 569–570)
Test assertions for Exception 28 updated to expect Access to invalid address: LOAD (wild pointer?) instead of LoadProhibited; both standard and skipped addr2line fast-path tests aligned.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly Related PRs

  • Jason2866/ESP-Decoder#1: Modifies Xtensa fault parsing in src/crashDecoder.ts and how exception descriptions are handled.
  • Jason2866/ESP-Decoder#31: Directly updates XTENSA_EXCEPTIONS descriptions and parseXtensaFaultInfo formatting for Xtensa/ESP exception reporting.

Poem

🐰 A decoder's tale of Xtensa delight,
Where exceptions now shine clear and bright,
No more cryptic codes in the crash-decoded night,
Full descriptions paint the fault so right!
The rabbits applaud—the messages took flight! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enhancing ESP8266 exception handling by adding more descriptive text to exception numbers instead of short identifiers.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch human_read_exc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/crashDecoder.ts`:
- Around line 1452-1470: Replace the two malformed exception description strings
in src/crashDecoder.ts: change 'Privileged: Attempt to execute a privileged
operation when CRING ? 0' to a clear condition (e.g. 'Privileged: Attempt to
execute a privileged operation when CRING != 0') and change 'LoadStorePrivilege:
A load or store referenced a virtual address at a ring level less than ' to
match the corresponding instruction fetch message (e.g. 'LoadStorePrivilege: A
load or store referenced a virtual address at a ring level less than CRING');
update the exact entries that currently contain those old strings so user-facing
fault output is no longer truncated or typoed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4d7c4576-b68d-4a7c-a9ff-9110cf0c3279

📥 Commits

Reviewing files that changed from the base of the PR and between 73e810b and 6b5cf1b.

📒 Files selected for processing (2)
  • src/crashDecoder.ts
  • src/test/crashDecoder.test.ts

Comment thread src/crashDecoder.ts Outdated
@Jason2866 Jason2866 merged commit 0fd6e83 into main May 5, 2026
3 checks passed
@Jason2866 Jason2866 deleted the human_read_exc branch May 5, 2026 10:15
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