diff --git a/src/future/Future.php b/src/future/Future.php index 7ac13258..3c371bc4 100644 --- a/src/future/Future.php +++ b/src/future/Future.php @@ -41,15 +41,15 @@ abstract class Future extends Phobject { 'timeout.')); } - if ($this->hasException()) { - throw $this->getException(); - } - - if (!$this->hasResult()) { + if (!$this->hasResult() && !$this->hasException()) { $graph = new FutureIterator(array($this)); $graph->resolveAll(); } + if ($this->hasException()) { + throw $this->getException(); + } + return $this->getResult(); }