exception = $e; } /** * Intercept the exception and inject a response * * @param ResponseInterface $response Response to set */ public function intercept(ResponseInterface $response) { $this->stopPropagation(); $this->getTransaction()->setResponse($response); RequestEvents::emitComplete($this->getTransaction()); } /** * Get the exception that was encountered * * @return RequestException */ public function getException() { return $this->exception; } /** * Get the response the was received (if any) * * @return ResponseInterface|null */ public function getResponse() { return $this->getException()->getResponse(); } }