private function CurlMulti::checkCurlResult

Throw an exception for a cURL multi response if needed

Parameters

int $code Curl response code:

Throws

CurlException

2 calls to CurlMulti::checkCurlResult()

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlMulti.php, line 572

Class

CurlMulti
Send { This implementation allows callers to send blocking requests that return back to the caller when their requests complete, regardless of whether or not previously sending requests in the curl_multi object have completed. The implementation…

Namespace

Guzzle\Http\Curl

Code

private function checkCurlResult($code) {
  if ($code != CURLM_OK && $code != CURLM_CALL_MULTI_PERFORM) {
    if (isset($this->multiErrors[$code])) {
      $message = "cURL error: {$code} ({$this->multiErrors[$code][0]}): cURL message: {$this->multiErrors[$code][1]}";
    }
    else {
      $message = 'Unexpected cURL error: ' . $code;
    }
    throw new CurlException($message);
  }
}