public function generatorResponse()
{
if ($this->endEvent instanceof ReturnedEvent) {
return array(null, $this->endEvent->value());
}
if ($this->endEvent instanceof ThrewEvent) {
return array($this->endEvent->exception(), null);
}
throw new UndefinedResponseException('The call has not yet responded via generator.');
}