Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reword some exception messages.

  • Loading branch information...
commit 28e1e7ad25fb71bb66850609dd2e177bab9ad85c 1 parent 98112fd
@nrk authored
View
2  lib/Predis/Monitor/MonitorContext.php
@@ -53,7 +53,7 @@ public function __destruct()
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) {
View
2  lib/Predis/PubSub/PubSubContext.php
@@ -50,7 +50,7 @@ public function __construct(ClientInterface $client, Array $options = null)
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');
View
6 lib/Predis/Transaction/MultiExecContext.php
@@ -118,7 +118,7 @@ protected function checkState($flags)
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 @@ protected function executeTransactionBlock($callable)
*/
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
View
2  tests/Predis/Monitor/MonitorContextTest.php
@@ -41,7 +41,7 @@ public function testMonitorContextRequireMonitorCommand()
/**
* @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()
{
View
2  tests/Predis/PubSub/PubSubContextTest.php
@@ -40,7 +40,7 @@ public function testPubSubContextRequirePubSubRelatedCommand()
/**
* @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()
{
Please sign in to comment.
Something went wrong with that request. Please try again.