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

Add ExceptionDispatchInfo.SetRemoteStackTrace #50392

Merged

Conversation

GrabYourPitchforks
Copy link
Member

Resolves #50044.

The approved API (see #50044 (comment)) returns bool, which is clearly a mistake given that we wanted to make it a non-try method just like its sibling SetCurrentStackTrace. So for this PR, I made the method return Exception, just like its sibling. I believe this follows the spirit of what the API review intended.

It's too difficult for me to test the "immutable agile exception" case, so I didn't. That's going to have to remain within the purview of code review.

Also took this time to do some minor cleanup of existing devdoc and unit tests. Nothing too fancy.

/cc @ReubenBond

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@GrabYourPitchforks
Copy link
Member Author

Oh no what did I break? :(

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Other than Jan's comments, LGTM.

- Share more code across coreclr + mono
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks!

@GrabYourPitchforks
Copy link
Member Author

Opened #50520 to track the crossgen2 test failures.

@GrabYourPitchforks GrabYourPitchforks merged commit 9064eed into dotnet:main Apr 1, 2021
@GrabYourPitchforks GrabYourPitchforks deleted the exception_setstacktrace branch April 1, 2021 00:09
@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API Proposal: ExceptionDispatchInfo.TrySetStackTrace
3 participants