Skip to content
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

Mention that the copied exception's message must be like the original #1931

Closed
wants to merge 1 commit into from

Conversation

adamschoenemann
Copy link

Just a quick fly-by PR as a suggestion on including this information.

@elizarov
Copy link
Contributor

I am not sure such a strong wording is really needed. Nothing is going to break inside coroutines machinery is the copied exception message is different from the original, so an emphasis on "must" does not seem to be warranted here. I think it is better to rephrase it as a recommendation.

@adamschoenemann
Copy link
Author

I'm not married to the wording at all here.
But the point I wanted to come across was that it's not gonna attempt to restore the stack if the message is not the same as copied exception.
As per this line

// Verify that the new exception has the same message as the original one (bail out if not, see #1631)

@elizarov
Copy link
Contributor

Good point. That should be added to the docs. That is, the explanation should mentation that the same message is a prerequisite for the stack recovery mechanism.

@adamschoenemann
Copy link
Author

Exactly :)

@adamschoenemann
Copy link
Author

Should I close this MR and open an issue instead or what would you prefer?

@elizarov
Copy link
Contributor

It just needs a bit rephrasing and clarification on why the same message is needed. No need to close PR. It can be amended.

qwwdfsad added a commit that referenced this pull request Jun 7, 2021
@qwwdfsad
Copy link
Member

qwwdfsad commented Jun 7, 2021

Thanks! This PR triggered me to investigate the exception message comparison and uncovered #2749.

This PR is superseded by #2749

@qwwdfsad qwwdfsad closed this Jun 7, 2021
qwwdfsad added a commit that referenced this pull request Jun 21, 2021
qwwdfsad added a commit that referenced this pull request Jun 21, 2021
pablobaxter pushed a commit to pablobaxter/kotlinx.coroutines that referenced this pull request Sep 14, 2022
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.

3 participants