8 * This source file is subject to the new BSD license that is bundled
9 * with this package in the file LICENSE.txt.
10 * It is also available through the world-wide-web at this URL:
11 * http://framework.zend.com/license/new-bsd
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@zend.com so we can send you a copy immediately.
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
25 * Zend_Gdata_App_Exception
27 require_once 'Zend/Gdata/App/Exception.php';
30 * Zend_Http_Client_Exception
32 require_once 'Zend/Http/Client/Exception.php';
37 * Class to represent exceptions that occur during Gdata operations.
42 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
43 * @license http://framework.zend.com/license/new-bsd New BSD License
45 class Zend_Gdata_App_HttpException extends Zend_Gdata_App_Exception
48 protected $_httpClientException = null;
49 protected $_response = null;
52 * Create a new Zend_Gdata_App_HttpException
54 * @param string $message Optionally set a message
55 * @param Zend_Http_Client_Exception Optionally pass in a Zend_Http_Client_Exception
56 * @param Zend_Http_Response Optionally pass in a Zend_Http_Response
58 public function __construct($message = null, $e = null, $response = null)
60 $this->_httpClientException = $e;
61 $this->_response = $response;
62 parent::__construct($message);
66 * Get the Zend_Http_Client_Exception.
68 * @return Zend_Http_Client_Exception
70 public function getHttpClientException()
72 return $this->_httpClientException;
76 * Set the Zend_Http_Client_Exception.
78 * @param Zend_Http_Client_Exception $value
80 public function setHttpClientException($value)
82 $this->_httpClientException = $value;
87 * Set the Zend_Http_Response.
89 * @param Zend_Http_Response $response
91 public function setResponse($response)
93 $this->_response = $response;
98 * Get the Zend_Http_Response.
100 * @return Zend_Http_Response
102 public function getResponse()
104 return $this->_response;
108 * Get the body of the Zend_Http_Response
112 public function getRawResponseBody()
114 if ($this->getResponse()) {
115 $response = $this->getResponse();
116 return $response->getRawBody();