You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried using other operators like take or another filter, after the initial (throwing) filter, and those work as expected, ie. the error listener is called.
Operator fusion such as filter+map or map+flatten has been causing bugs to users, such as #165 and
#178. Since this library's focus is not "as high performance as possible", we need to prioritize
correctness and library size. Removing operator fusion should solve the mentioned issues besides
others not reported.
#165 and #178
Hi there, I'm not sure if this a bug or intended behaviour.
I have a stream of things, and I'm calling a validation function (eg.
isValid
) which may throw.This is the expected behavior:
However, when I try to add a
map
operator, the error does not get passed to the error listener, as expected. The exception is not handled at all.thing$ .filter(isValid) + .map(x => {type: 'success', payload: x}) .addListener({next: console.log, error: console.error}) // throws!
I've tried using other operators like
take
or anotherfilter
, after the initial (throwing)filter
, and those work as expected, ie. the error listener is called.Here is an executable example, if this is unclear: https://runkit.com/lachenmayer/xstream-error-handling
version: 10.3.0
The text was updated successfully, but these errors were encountered: