Exemplo n.º 1
0
 /**
  * @param \Exception|\Throwable $exception
  * @param \Kdyby\Github\Api\Response $response
  */
 public function failure($exception, Api\Response $response)
 {
     if (!isset($this->calls[$oid = spl_object_hash($response->getRequest())])) {
         return;
     }
     $debugInfo = $response->debugInfo;
     $current = $this->calls[$oid];
     $this->totalTime += $current->time = $debugInfo['total_time'];
     unset($debugInfo['total_time']);
     $current->info = $debugInfo;
     $current->info['method'] = $response->getRequest()->getMethod();
     $current->exception = $exception;
 }