Skip to content

Add rich error message for context message graph #1283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kriswuollett
Copy link

Fixes #1282

Copy link
Collaborator

@caspermeijn caspermeijn left a comment

Choose a reason for hiding this comment

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

This error message is better than before, but it still doesn't explain what is happening. As a user of prost I don't know what a message graph is.

I feel like get_message should never have been called for a message name that is not in the graph. I think there is another underlaying problem that needs to be fixed.

@kriswuollett kriswuollett requested a review from caspermeijn May 26, 2025 10:31
Copy link
Collaborator

@caspermeijn caspermeijn left a comment

Choose a reason for hiding this comment

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

This still doesn't help a user when it gets this error. But at least it is better than an unwrap on None

Copy link
Collaborator

@caspermeijn caspermeijn left a comment

Choose a reason for hiding this comment

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

Sorry to bother you one more time. can_message_derive_eq has the same get_message. Could you add the same message to that as well?

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.

Panic without good error message in prost-build when message not in graph
2 participants