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

Capture ExceptionDispatchInfo in ToAsyncEnumerable #1736

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saul
Copy link

@saul saul commented Mar 29, 2022

Hi

This PR fixes an issue where stacktraces of exceptions are lost in ToAsyncEnumerable. See the added test - before this PR, the ThrowsException method isn't mentioned in the stacktrace at all. The stacktrace only contained System.Reactive internals. This PR uses ExceptionDispatchInfo to capture the stacktrace of active exceptions (i.e. those that have been raised).

Many thanks

@saul
Copy link
Author

saul commented Apr 19, 2022

@danielcweber any chance you could do a quick review?

@saul
Copy link
Author

saul commented Mar 19, 2023

@idg10 any chance of a review here?

Copy link
Collaborator

@idg10 idg10 left a comment

Choose a reason for hiding this comment

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

The basic goal seems fine, but I've got one question: is this the only place in the entire library where this is an issue, do you know?

(I've mainly been focusing on Rx so far so I'm not familiar with Ix yet. I know we have a load of places in Rx where exceptions get caught. So it surprises me to see only one.)

@saul
Copy link
Author

saul commented Mar 30, 2023

We make extensive use of System.Reactive in our codebase and this is the only stacktrace issue we've seen.

Thank you for the review - I'll work through the comments tomorrow!

@saul
Copy link
Author

saul commented May 12, 2023

@idg10 I believe all comments are resolved now

@saul
Copy link
Author

saul commented Oct 13, 2023

@idg10 please can this be merged?

@saul
Copy link
Author

saul commented Apr 4, 2024

Gentle nudge @idg10 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants