While integrating most with @cycle/time, I noticed some curious behavior.
import {Observable} from 'rxjs/Rx';
function boom () {
throw new Error('boom!');
}
const stream = most.from(Observable.of('a')).map(boom);
stream.subscribe({
next (ev) {},
error (err) {
console.log('Handled error');
},
complete () {}
});
I would expect this code to log 'Handled error'. Instead the error is thrown when it occurs, not caught and passed into the error handler in subscribe.
If most.from(Observable.of('a')) is replaced with most.of('a') the code functions as expected.
Hi!
While integrating most with
@cycle/time
, I noticed some curious behavior.I would expect this code to log 'Handled error'. Instead the error is thrown when it occurs, not caught and passed into the error handler in subscribe.
If
most.from(Observable.of('a'))
is replaced withmost.of('a')
the code functions as expected.