You are here

class HttpClientException in Http Client 6.2

Same name and namespace in other branches
  1. 7.2 includes/HttpClient.inc \HttpClientException

Exception that's used to pass information about the response when a operation fails.

Hierarchy

Expanded class hierarchy of HttpClientException

File

includes/HttpClient.inc, line 273

View source
class HttpClientException extends Exception {
  protected $response;
  public function __construct($message, $code = 0, $response = NULL, $exception = NULL) {
    parent::__construct($message, $code);
    $this->response = $response;
  }

  /**
   * Gets the response object, if any.
   */
  public function getResponse() {
    $response = $this->response;
    if (is_object($response)) {
      $response = clone $response;
    }
    return $response;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HttpClientException::$response protected property
HttpClientException::getResponse public function Gets the response object, if any.
HttpClientException::__construct public function