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
{{ message }}
This repository was archived by the owner on Apr 20, 2018. It is now read-only.
It is really nice to see spawn in the rxjs - unfortunately it seems that error handling does not work.
rx.js 4.0.0
vars=Rx.Observable.spawn(function*(){try{varerr1=yieldRx.Observable.throw('1');console.log('ERR_1',err1);varerr2=yieldPromise.reject('2');console.log('ERR_2',err2);}catch(ex){// never calledconsole.error('ERROR_RX_JS',ex);}});s.subscribe(_=>_,(err)=>console.log(err),()=>console.log('completed'));
Output:
ERR_1 1
ERR_2 2
completed
For comparison:
co 4.6.0
co(function*(){try{varerr1=yieldRx.Observable.throw('1').toPromise();console.log('ERR_1',err1);varerr2=yieldPromise.reject('2');console.log('ERR_2',err2);}catch(ex){// here `err1` is undefinedconsole.error('ERROR_CO',ex);}});