Fix and reword some exception messages.

This commit is contained in:
Daniele Alessandri
2013-12-16 13:17:45 +01:00
parent 43f278fb71
commit 0f34f41ccf
70 changed files with 172 additions and 180 deletions
@@ -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;