Each Zend_Service_Technorati query method throws a
Zend_Service_Technorati_Exception exception on failure with a
meaningful error message.
There are several reasons that may cause a
Zend_Service_Technorati query to fail.
Zend_Service_Technorati validates all parameters for any query
request. If a parameter is invalid or it contains an invalid value, a new
Zend_Service_Technorati_Exception exception is thrown.
Additionally, the Technorati API interface could be temporally
unavailable, or it could return a response that is not well formed.
You should always wrap a Technorati query with a try ... catch block.
Example 828. Handling a Query Exception
<?php
$technorati = new Zend_Service_Technorati('VALID_API_KEY');
try {
$resultSet = $technorati->search('PHP');
} catch(Zend_Service_Technorati_Exception $e) {
echo "An error occurred: " $e->getMessage();
}




