Skip to content

kernel: improve ErrorReturnVoid break-loop message#6416

Open
fingolfin wants to merge 2 commits into
masterfrom
codex/consistent-ErrorReturn-guidance-message
Open

kernel: improve ErrorReturnVoid break-loop message#6416
fingolfin wants to merge 2 commits into
masterfrom
codex/consistent-ErrorReturn-guidance-message

Conversation

@fingolfin
Copy link
Copy Markdown
Member

... and in general make its phrasing more consistent.

AI-assisted: OpenAI Codex prepared this code change.

Resolves #6272

@fingolfin fingolfin added topic: kernel release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: error handling labels May 27, 2026
@fingolfin fingolfin force-pushed the codex/consistent-ErrorReturn-guidance-message branch from 425503d to 269e028 Compare May 27, 2026 13:48
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

❌ Patch coverage is 38.88889% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.87%. Comparing base (9196a1f) to head (defed76).

Files with missing lines Patch % Lines
src/streams.c 0.00% 6 Missing ⚠️
src/stats.c 0.00% 2 Missing ⚠️
src/error.c 85.71% 0 Missing and 1 partial ⚠️
src/hpc/thread.c 0.00% 1 Missing ⚠️
src/vec8bit.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6416   +/-   ##
=======================================
  Coverage   78.87%   78.87%           
=======================================
  Files         685      685           
  Lines      293543   293549    +6     
  Branches     8679     8672    -7     
=======================================
+ Hits       231519   231530   +11     
+ Misses      60215    60212    -3     
+ Partials     1809     1807    -2     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fingolfin fingolfin force-pushed the codex/consistent-ErrorReturn-guidance-message branch from 269e028 to 188d8fd Compare May 28, 2026 00:07
Copy link
Copy Markdown
Member

@lgoettgens lgoettgens left a comment

Choose a reason for hiding this comment

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

LGTM, one comment below

Comment thread doc/ref/debug.xml Outdated
@ *stdin*:1
... at *stdin*:4
you may 'return;'
you can 'return;'
Copy link
Copy Markdown
Member

@lgoettgens lgoettgens Jun 5, 2026

Choose a reason for hiding this comment

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

Suggested change
you can 'return;'
you can 'return;' to continue

Shouldn't it be like this in all occurrences in this file?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, thanks. I'll double check when I am back at a computer.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In fact it should have been two lines:

you can 'quit;' to quit to outer loop, or
you can 'return;' to continue

I've updated the text now.

... at *stdin*:3
you may 'return;'
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Staring at this again, I wonder if we should insert a verb like "enter" or "type", like

Suggested change
you can 'return;' to continue
you can enter 'return;' to continue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good point.

... and in general make its phrasing more consistent.

AI-assisted: OpenAI Codex prepared this code change.

Co-authored-by: Codex <codex@openai.com>
@fingolfin fingolfin force-pushed the codex/consistent-ErrorReturn-guidance-message branch from 188d8fd to 8e98ca4 Compare June 6, 2026 19:10
@fingolfin
Copy link
Copy Markdown
Member Author

Ugh, looking closer for more parts to be adjusted, I discovered parts of the documentation that had been outdated for years.

Comment thread doc/ref/language.xml
gap> f2( 4 );
value: 4
Error, Function Calls: <func> must return a value
Stack trace:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hrm, I added this message (or rather asked the AI to add it, but in any case, my fault); but now question that. I'll open a separate PR to explore removing it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: error handling topic: kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better and more consistent user info string produced by ErrorReturnVoid

3 participants