Changeset View
Changeset View
Standalone View
Standalone View
src/hardpoint/ArcanistHardpointTask.php
| Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | if ($this->generator) { | ||||
| } | } | ||||
| $this->generator = null; | $this->generator = null; | ||||
| if ($generator_result !== null) { | if ($generator_result !== null) { | ||||
| $result = $generator_result->getValue(); | $result = $generator_result->getValue(); | ||||
| } else { | } else { | ||||
| $result = $generator->getReturn(); | $result = $generator->getReturn(); | ||||
| if ($result instanceof ArcanistHardpointTaskResult) { | |||||
| throw new Exception( | |||||
| pht( | |||||
| 'Generator (for query "%s") returned an '. | |||||
| '"ArcanistHardpointTaskResult" object, which is not a valid '. | |||||
| 'thing to return from a generator.'. | |||||
| "\n\n". | |||||
| 'This almost always means the generator implementation has a '. | |||||
| '"return $this->yield..." statement which should be '. | |||||
| 'a "yield $this->yield..." instead.', | |||||
| get_class($query))); | |||||
| } | |||||
| } | } | ||||
| $this->attachResult($result); | $this->attachResult($result); | ||||
| return true; | return true; | ||||
| } | } | ||||
| $objects = $this->getObjects(); | $objects = $this->getObjects(); | ||||
| ▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines | |||||