Zend Framework

Zend_Http_Client_Adapter_Exception instead Zend_Service_Twitter_Exception

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.0
  • Fix Version/s: 1.9.3
  • Component/s: Zend_Service_Twitter
  • Labels:
    None

Description

I have this code:

try {
$twitter = new Zend_Service_Twitter($config->twitter->username, $config->twitter->password);
} catch (Zend_Service_Twitter_Exception $e) {
$this->logger->err("Exception caught importing twitter: {$e->getMessage()}\n");
}

and when twitter offline I get:

Zend_Http_Client_Adapter_Exception: Unable to Connect to tcp://twitter.com:80. Error #110: Connection timed out in /srv/lib/php/Zend/Http/Client/Adapter/Socket.php on line 213

Activity

Hide
Jon Whitcraft added a comment - - edited

I can see where you are coming from this but I don't think that I should handle the Exception in the twitter client. I will run this by Matthew and/or Ralph to see what they think.

Show
Jon Whitcraft added a comment - - edited I can see where you are coming from this but I don't think that I should handle the Exception in the twitter client. I will run this by Matthew and/or Ralph to see what they think.
Hide
Pádraic Brady added a comment -

In r18172 I clarified the component's position of not rethrowing HTTP based exceptions by documenting the Exception class expected to be thrown for such errors. Using a service Exception is optional, and many other components instead allow the HTTP exceptions to reach the end user. This will not be changed to preserve the current behaviour, but hopefully the revised class doc blocks will inform future users.

Show
Pádraic Brady added a comment - In r18172 I clarified the component's position of not rethrowing HTTP based exceptions by documenting the Exception class expected to be thrown for such errors. Using a service Exception is optional, and many other components instead allow the HTTP exceptions to reach the end user. This will not be changed to preserve the current behaviour, but hopefully the revised class doc blocks will inform future users.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: