var p = new Promise<Int>();
p.reject(2);
p.then(function(a){
return true;
}).errorPipe(function(e){
return Promise.promise(false);
});
I expect result to be Promise with true for no errors, and false for error. I use that in tests.
But now it ends up in unhandled exception from update_errors. And if I call reject after errorPipe everything is as expected.
In errorPipe there's then(ret._resolve); and it ends up immediateLinkUpdate, isErrored branch.
handleError will check _error.length > 0 before calling next.handleError, immediateLinkUpdate wont.
This is similar to #44
I expect result to be Promise with true for no errors, and false for error. I use that in tests.
But now it ends up in unhandled exception from
update_errors
. And if I call reject after errorPipe everything is as expected.In
errorPipe
there'sthen(ret._resolve);
and it ends upimmediateLinkUpdate
,isErrored
branch.handleError
will check_error.length > 0
before callingnext.handleError
,immediateLinkUpdate
wont.Similar thing with errorThen.