-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
[Bug]: DisposeMany() suppresses exceptions #668
Comments
Thanks for reporting this. I'll take a look soon |
I've taken some time to look into this.
If this is changed to:
then the exception bubbles out. However, from a quick search of the code, it appears that SubscribeSafe is used in many places so other methods will also exhibit this behaviour (for example, I found that RefCount also suppresses errors). I imagine it is likely then that you will say that this behaviour will not change. If that's the case, is there something I can do on the outside to make the exceptions on the OnError channel throw?
the exception is still swallowed. |
Exceptions should propagate. Let's not rush into changing everything, but it probably should be done. |
Exceptions aren't not-propagating, they're just being emitted via In my mind, Alternatively, consider this realistic scenario: var subscription = source
.Transform(item => new MyDisposable(name: item.Name.ToUpper()))
.DisposeMany(); Let's say that we have a bug where Additionally, if the exception throws out of
Where would you want them to throw? With the proposed change, you would get some exceptions to throw upon |
@RolandPheasant this should now be resolved. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug 🐞
Calling DisposeMany() on an IObservable<IChangeSet> prevents exceptions propagating out to the caller.
See the test case provided below.
If the call to DisposeMany is omitted, the test passes.
Step to reproduce
Reproduction repository
My work VPN prevents access to github via git
Expected behavior
When an exception is thrown from within the observable, and not handled by the caller, it should propagate out.
Screenshots 🖼️
No response
IDE
Visual Studio 2022
Operating system
No response
Version
No response
Device
No response
DynamicData Version
7.12.1
Additional information ℹ️
No response
The text was updated successfully, but these errors were encountered: