I expect that if one start a new chain on promise that already received error that error will propagate to that chain, until it meets promise with catchError called, that is AsyncBase with _error handlers.
This
var p = Promise.promise(1);
p.then(function(a){
trace("then", a);
}).catchError(function(e){
trace("catchError", e);
});
outputs
then,1
But this
var p = new Promise<Int>();
p.then(function(a){
trace("then1", a);
}).catchError(function(e){
trace("catchError1", e);
});
p.reject(2);
p.then(function(a){
trace("then2", a);
}).catchError(function(e){
trace("catchError2", e);
});
outputs
catchError1,2
If reject is called after creating of second chain both will catch error.
If one call then on resolved promise immediateLinkUpdate will catch this up and call next.handleResolve
There's also isErrored case, but _errored is never updated.
I expect that if one start a new chain on promise that already received error that error will propagate to that chain, until it meets promise with
catchError
called, that isAsyncBase
with_error
handlers.This
outputs
But this
outputs
If
reject
is called after creating of second chain both will catch error.If one call
then
on resolved promiseimmediateLinkUpdate
will catch this up and callnext.handleResolve
There's alsoisErrored
case, but_errored
is never updated.