stevan / promises-perl

An implementation of Promises in Perl
31 stars 29 forks source link

Rejections are not propagated #73

Closed kraih closed 7 years ago

kraih commented 7 years ago

I've been stealing some of the internal design of Promises for Mojolicious, and noticed that rejections are not propagated through the promise chain. It looks like this line should be $d->$method(@results); instead of $d->resolve(@results);.

You can test this by chaining multiple ->catch(sub {...}) calls. Propagating rejections is a requirement of Promises/A+.

kraih commented 7 years ago

My bad, looks like i misunderstood the spec.

yanick commented 7 years ago

Heh. :-)