Reword some exception messages.

This commit is contained in:
Daniele Alessandri
2012-07-26 16:31:09 +02:00
parent 98112fdb39
commit 28e1e7ad25
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ class MonitorContext implements \Iterator
private function checkCapabilities(ClientInterface $client)
{
if ($client->getConnection() instanceof AggregatedConnectionInterface) {
throw new NotSupportedException('Cannot initialize a monitor context over a cluster of connections');
throw new NotSupportedException('Cannot initialize a monitor context when using aggregated connections');
}
if ($client->getProfile()->supportsCommand('monitor') === false) {
+1 -1
View File
@@ -50,7 +50,7 @@ class PubSubContext extends AbstractPubSubContext
private function checkCapabilities(ClientInterface $client)
{
if ($client->getConnection() instanceof AggregatedConnectionInterface) {
throw new NotSupportedException('Cannot initialize a PUB/SUB context over a cluster of connections');
throw new NotSupportedException('Cannot initialize a PUB/SUB context when using aggregated connections');
}
$commands = array('publish', 'subscribe', 'unsubscribe', 'psubscribe', 'punsubscribe');
+3 -3
View File
@@ -118,7 +118,7 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
private function checkCapabilities(ClientInterface $client)
{
if ($client->getConnection() instanceof AggregatedConnectionInterface) {
throw new NotSupportedException('Cannot initialize a MULTI/EXEC context over a cluster of connections');
throw new NotSupportedException('Cannot initialize a MULTI/EXEC context when using aggregated connections');
}
$profile = $client->getProfile();
@@ -440,8 +440,8 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
*/
private function onProtocolError($message)
{
// Since a MULTI/EXEC block cannot be initialized over a clustered
// connection, we can safely assume that Predis\Client::getConnection()
// Since a MULTI/EXEC block cannot be initialized when using aggregated
// connections, we can safely assume that Predis\Client::getConnection()
// will always return an instance of Predis\Connection\SingleConnectionInterface.
Helpers::onCommunicationException(new ProtocolException(
$this->client->getConnection(), $message
+1 -1
View File
@@ -41,7 +41,7 @@ class MonitorContextTest extends StandardTestCase
/**
* @group disconnected
* @expectedException Predis\NotSupportedException
* @expectedExceptionMessage Cannot initialize a monitor context over a cluster of connections
* @expectedExceptionMessage Cannot initialize a monitor context when using aggregated connections
*/
public function testMonitorContextDoesNotWorkOnClusters()
{
+1 -1
View File
@@ -40,7 +40,7 @@ class PubSubContextTest extends StandardTestCase
/**
* @group disconnected
* @expectedException Predis\NotSupportedException
* @expectedExceptionMessage Cannot initialize a PUB/SUB context over a cluster of connections
* @expectedExceptionMessage Cannot initialize a PUB/SUB context when using aggregated connections
*/
public function testPubSubContextDoesNotWorkOnClusters()
{