/** * On multi exception event. * * @param \Ivory\HttpAdapter\Event\MultiExceptionEvent $event The multi exception event. */ public function onMultiException(MultiExceptionEvent $event) { foreach ($event->getExceptions() as $exception) { $this->stopwatch->stop($this->getStopwatchName($event->getHttpAdapter(), $exception->getRequest())); } }
/** * On multi exception event. * * @param \Ivory\HttpAdapter\Event\MultiExceptionEvent $event The multi exception event. */ public function onMultiException(MultiExceptionEvent $event) { foreach ($event->getExceptions() as $exception) { $this->collectException($event->getHttpAdapter(), $exception); } }
/** * On multi exception event. * * @param \Ivory\HttpAdapter\Event\MultiExceptionEvent $event The multi exception event. */ public function onMultiException(MultiExceptionEvent $event) { $retryRequests = array(); foreach ($event->getExceptions() as $exception) { if ($this->retry->retry($exception->getRequest(), false)) { $retryRequests[] = $exception->getRequest(); $event->removeException($exception); } } if (empty($retryRequests)) { return; } try { $event->addResponses($event->getHttpAdapter()->sendRequests($retryRequests)); } catch (MultiHttpAdapterException $e) { $event->addResponses($e->getResponses()); $event->addExceptions($e->getExceptions()); } }
/** * On multi exception event. * * @param \Ivory\HttpAdapter\Event\MultiExceptionEvent $event The multi exception event. */ public function onMultiException(MultiExceptionEvent $event) { foreach ($event->getExceptions() as $exception) { $exception->setRequest($this->error($event->getHttpAdapter(), $exception)); } }