class CurlException

cURL request exception

Hierarchy

Expanded class hierarchy of CurlException

1 file declares its use of CurlException
CurlMulti.php in drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlMulti.php

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Exception/CurlException.php, line 10

Namespace

Guzzle\Http\Exception
View source
class CurlException extends BadResponseException {
  private $curlError;
  private $curlErrorNo;
  private $handle;

  /**
   * Set the cURL error message
   *
   * @param string $error  Curl error
   * @param int    $number Curl error number
   *
   * @return self
   */
  public function setError($error, $number) {
    $this->curlError = $error;
    $this->curlErrorNo = $number;
    return $this;
  }

  /**
   * Set the associated curl handle
   *
   * @param CurlHandle $handle Curl handle
   *
   * @return self
   */
  public function setCurlHandle(CurlHandle $handle) {
    $this->handle = $handle;
    return $this;
  }

  /**
   * Get the associated cURL handle
   *
   * @return CurlHandle|null
   */
  public function getCurlHandle() {
    return $this->handle;
  }

  /**
   * Get the associated cURL error message
   *
   * @return string
   */
  public function getError() {
    return $this->curlError;
  }

  /**
   * Get the associated cURL error number
   *
   * @return int
   */
  public function getErrorNo() {
    return $this->curlErrorNo;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BadResponseException::$response private property
BadResponseException::factory public static function Factory method to create a new response exception based on the response code.
BadResponseException::getResponse public function Get the response that caused the exception
BadResponseException::setResponse public function Set the response that caused the exception
CurlException::$curlError private property
CurlException::$curlErrorNo private property
CurlException::$handle private property
CurlException::getCurlHandle public function Get the associated cURL handle
CurlException::getError public function Get the associated cURL error message
CurlException::getErrorNo public function Get the associated cURL error number
CurlException::setCurlHandle public function Set the associated curl handle
CurlException::setError public function Set the cURL error message
RequestException::$request protected property
RequestException::getRequest public function Get the request that caused the exception
RequestException::setRequest public function Set the request that caused the exception