Skip to content

Add ExceptionDispatchInfo.SetRemoteStackTrace - #50392

Merged
GrabYourPitchforks merged 3 commits into
dotnet:mainfrom
GrabYourPitchforks:exception_setstacktrace
Apr 1, 2021
Merged

GrabYourPitchforks merged 3 commits into
dotnet:mainfrom
GrabYourPitchforks:exception_setstacktrace

Conversation

@GrabYourPitchforks

Copy link
Copy Markdown
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

@ghost

ghost commented Mar 29, 2021

Copy link
Copy Markdown

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
Copy Markdown
Member Author

Oh no what did I break? :(

@stephentoub stephentoub left a comment

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.

Other than Jan's comments, LGTM.

- Share more code across coreclr + mono

@jkotas jkotas left a comment

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.

Thanks!

@GrabYourPitchforks

Copy link
Copy Markdown
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