-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Promise._catch() causes to lost previous result so the next handler in the chain gets null. See:
| return this.then (null, onRejected); |
public <U> Promise <U> _catch (OnRejected onRejected)
{
if (onRejected == null)
throw new IllegalStateException ("onRejected cannot be null");
return this.then (null, onRejected);
}Maybe it should be replaced by:
public <U> Promise <U> _catch (OnRejected onRejected)
{
if (onRejected == null)
throw new IllegalStateException ("onRejected cannot be null");
return this.then (v -> Promise.resolve(v), onRejected);
}Metadata
Metadata
Assignees
Labels
No labels