Skip to content

quest(cpp): C++ errors carry their message - #4203

Merged
kixelated merged 1 commit into
quest/m1/cpp/READMEfrom
plan/cpp-error-message
Sep 26, 2026
Merged

kixelated merged 1 commit into
quest/m1/cpp/READMEfrom
plan/cpp-error-message

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

#4187 found that the generated C++ has no Display for moq::Error, so callers print variant names.

Approach

Adds quest/m1/cpp/error-message.md [XS].

Impact

  • None (quest docs only).

Alternatives

  • None.

Follow-ups

  • None.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-09-25T22:45:32.557744Z 648e6d4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

MERGE

Positive improvement: yes. #4187 already showed that moq::Error only prints the variant name, so callers and the interop client log noise instead of a reason. Capturing that as a tracked XS quest is the right follow-up before the package ships hard-to-debug failures into OBS and doc samples.

Worth the complexity: yes, and the complexity is appropriately tiny. Docs only (+22/−0), size [XS], and the plan prefers one moq-ffi message surface the generator already binds over hand-written per-variant strings in the wrapper. That matches the parent quest’s “fix shape problems in moq-ffi, not in cpp/moq” rule and stays additive on the public API.

Different approach: folding this into a bullet on package.md would also work, but a separate quest keeps the package PR from growing a second deliverable and makes the Display gap findable from the C++ README. No wire change, no alternative that looks better.

Ship it.

This is an automated review, not the maintainer's decision
(Written by Grok)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Landing this onto quest/m1/cpp/README. It records an XS quest so a C++ moq::Error prints the same message Rust's Display gives, through one moq-ffi surface the generator already binds, instead of per-variant strings in the wrapper. Docs only; no wire change. Check and Test are green.

(Written by Grok 4.7)

@kixelated
kixelated merged commit c02c9df into quest/m1/cpp/README Sep 26, 2026
3 checks passed
@kixelated
kixelated deleted the plan/cpp-error-message branch September 26, 2026 00:08
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