Skip to content

Commit

Permalink
more exception catching fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Giroux committed Mar 29, 2012
1 parent 8f2a27b commit 91007f5
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions helper/ClusterHelper.php
Expand Up @@ -42,7 +42,7 @@ public function getClusterNameForIndex($index) {

return $sys_manager->describe_cluster_name();
}
catch (TException $e) {
catch (NoServerAvailable $e) {
return null;
}
}
Expand All @@ -56,14 +56,16 @@ public function getArrayOfNodesForCurrentCluster() {
return $all_nodes;
}

/*
Get an array of Cassandra nodes (IP:port) for cluster at $index
*/
public function getArrayOfNodesForIndex($index) {
$all_nodes = $this->cassandra_clusters[$index]['nodes'];
/*
Get an array of Cassandra nodes (IP:port) for cluster at $index
@param $index Index of the cluster name to get
*/
public function getArrayOfNodesForIndex($index) {
$all_nodes = $this->cassandra_clusters[$index]['nodes'];

return $all_nodes;
}
return $all_nodes;
}

/*
Get a random Cassandra node at $index
Expand Down

0 comments on commit 91007f5

Please sign in to comment.