Commit 1c18f53f authored by Bas de Nooijer's avatar Bas de Nooijer

Added exception handling to parallelexecution plugin

parent 8a288690
...@@ -86,8 +86,12 @@ class Solarium_Plugin_ParallelExecution extends Solarium_Plugin_Abstract ...@@ -86,8 +86,12 @@ class Solarium_Plugin_ParallelExecution extends Solarium_Plugin_Abstract
// get the results // get the results
$results = array(); $results = array();
foreach ($handles as $key => $handle) { foreach ($handles as $key => $handle) {
$response = $adapter->getResponse($handle, curl_multi_getcontent($handle)); try {
$results[$key] = $this->_client->createResult($queries[$key], $response); $response = $adapter->getResponse($handle, curl_multi_getcontent($handle));
$results[$key] = $this->_client->createResult($queries[$key], $response);
} catch(Solarium_Client_HttpException $e) {
$results[$key] = $e;
}
} }
return $results; return $results;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment