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

Consider using SuppressedError when invoking a callback in error steps #177

Open
domfarolino opened this issue Sep 22, 2024 · 0 comments
Open
Labels
possible future enhancement An enhancement that doesn't block standardization or shipping

Comments

@domfarolino
Copy link
Collaborator

The catch() and inspect() operators have internal observers whose error steps invoke a developer-supplied callback with the given error value they receive. If that callback throws an error, then we must invoke Subscriber's error() method with the error thrown from the callback instead of the original error they intended to surface. This clobbering of the original error is exactly what SuppressedError intends to alleviate (first mentioned in #174), so we should consider using it in those operators.

@domfarolino domfarolino added the possible future enhancement An enhancement that doesn't block standardization or shipping label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible future enhancement An enhancement that doesn't block standardization or shipping
Projects
None yet
Development

No branches or pull requests

1 participant