File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,21 +381,21 @@ $deferred = new React\Promise\Deferred();
381381
382382$deferred->promise()
383383 ->then(function ($x) {
384- throw $x + 1;
384+ throw new \Exception( $x + 1) ;
385385 })
386- ->then(null, function ($x) {
386+ ->then(null, function (\Exception $x) {
387387 // Propagate the rejection
388- throw new \Exception($x + 1) ;
388+ throw $x ;
389389 })
390390 ->then(null, function (\Exception $x) {
391391 // Can also propagate by returning another rejection
392392 return React\Promise\When::reject((integer) $x->getMessage() + 1);
393393 })
394394 ->then(null, function ($x) {
395- echo 'Reject ' . $x; // 4
395+ echo 'Reject ' . $x; // 3
396396 });
397397
398- $deferred->resolve(1); // Prints "Reject 4 "
398+ $deferred->resolve(1); // Prints "Reject 3 "
399399```
400400
401401#### Mixed resolution and rejection forwarding
You can’t perform that action at this time.
0 commit comments