/** * {@inheritdoc} */ public function onException(ExceptionEvent $event) { if (!$this->retry->retry($event->getException()->getRequest())) { return; } try { $event->setResponse($event->getHttpAdapter()->sendRequest($event->getException()->getRequest())); } catch (HttpAdapterException $e) { $event->setException($e); } }
/** * On exception event. * * @param \Ivory\HttpAdapter\Event\ExceptionEvent $event The event. */ public function onException(ExceptionEvent $event) { $this->stopwatch->stop($this->getStopwatchName($event->getHttpAdapter(), $event->getException()->getRequest())); }
/** * On exception event. * * @param \Ivory\HttpAdapter\Event\ExceptionEvent $event The exception event. */ public function onException(ExceptionEvent $event) { $this->collectException($event->getHttpAdapter(), $event->getException()); }
/** * On exception event. * * @param \Ivory\HttpAdapter\Event\ExceptionEvent $event The exception event. */ public function onException(ExceptionEvent $event) { $event->getException()->setRequest($this->error($event->getHttpAdapter(), $event->getException())); }