mirror of
https://github.com/predis/predis.git
synced 2026-10-10 22:07:31 +00:00
Fix and reword some exception messages.
This commit is contained in:
@@ -44,9 +44,7 @@ class MasterSlaveReplication implements ReplicationConnectionInterface
|
||||
protected function check()
|
||||
{
|
||||
if (!isset($this->master) || !$this->slaves) {
|
||||
throw new RuntimeException(
|
||||
'Replication needs a master and at least one slave.'
|
||||
);
|
||||
throw new RuntimeException('Replication needs one master and at least one slave.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +146,7 @@ class MasterSlaveReplication implements ReplicationConnectionInterface
|
||||
$connection = $this->getConnectionById($connection);
|
||||
}
|
||||
if ($connection !== $this->master && !in_array($connection, $this->slaves, true)) {
|
||||
throw new InvalidArgumentException('The specified connection is not valid.');
|
||||
throw new InvalidArgumentException('Invalid connection or connection not found.');
|
||||
}
|
||||
|
||||
$this->current = $connection;
|
||||
|
||||
Reference in New Issue
Block a user