Пример #1
0
 /**
  * Checks ReST response for errors.
  *
  * @param   Zend_Http_Response $response    the ReST response
  * @return  void
  * @throws  Zend_Service_Technorati_Exception
  * @access  protected
  */
 protected static function _checkResponse(Zend_Http_Response $response)
 {
     if ($response->isError()) {
         /**
          * @see Zend_Service_Technorati_Exception
          */
         // require_once 'Zend/Service/Technorati/Exception.php';
         throw new Zend_Service_Technorati_Exception(sprintf('Invalid response status code (HTTP/%s %s %s)', $response->getVersion(), $response->getStatus(), $response->getMessage()));
     }
 }
Пример #2
0
 /**
  * Checks ReST response for errors.
  *
  * @param   Zend_Http_Response $response    the ReST response
  * @return  void
  * @throws  Zend_Service_Technorati_Exception
  * @access  protected
  */
 protected static function _checkResponse(Zend_Http_Response $response)
 {
     if ($response->isError()) {
         throw new Zend_Service_Technorati_Exception(sprintf('Invalid response status code (HTTP/%s %s %s)', $response->getVersion(), $response->getStatus(), $response->getMessage()));
     }
 }