示例#1
0
 /**
  * {@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);
     }
 }
示例#2
0
 /**
  * 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());
 }
示例#4
0
 /**
  * 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()));
 }