Consider using SuppressedError
when invoking a callback in error steps
#177
Labels
possible future enhancement
An enhancement that doesn't block standardization or shipping
The
catch()
andinspect()
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'serror()
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 whatSuppressedError
intends to alleviate (first mentioned in #174), so we should consider using it in those operators.The text was updated successfully, but these errors were encountered: