-
Notifications
You must be signed in to change notification settings - Fork 756
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
base: main
Are you sure you want to change the base?
Conversation
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableTests.cs
Show resolved
Hide resolved
@danielcweber any chance you could do a quick review? |
@idg10 any chance of a review here? |
There was a problem hiding this 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.)
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableTests.cs
Outdated
Show resolved
Hide resolved
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableTests.cs
Show resolved
Hide resolved
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! |
@idg10 I believe all comments are resolved now |
@idg10 please can this be merged? |
Gentle nudge @idg10 :) |
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