public function exception() { if ($this->responseEvent instanceof ThrewEvent) { return $this->responseEvent->exception(); } throw new UndefinedResponseException('The call has not yet thrown an exception.'); }