class HttpClientException in Http Client 6.2
Same name and namespace in other branches
- 7.2 includes/HttpClient.inc \HttpClientException
Exception that's used to pass information about the response when a operation fails.
Hierarchy
- class \HttpClientException extends \Exception
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HttpClientException:: |
protected | property | ||
HttpClientException:: |
public | function | Gets the response object, if any. | |
HttpClientException:: |
public | function |